HTML block element at inline element
- Previous Page HTML List
- Next Page HTML Class
Maaaring ipagsama ang mga HTML element sa pamamagitan ng <div> at <span>.
HTML Block Elements
Most HTML elements are defined as block-level elements or inline elements.
Editor's note: 'Block-level element' is translated as 'block level element', and 'inline element' is translated as 'inline element'.
Block-level elements usually start on a new line when displayed in the browser (and end).
Examples: <h1>, <p>, <ul>, <table>
HTML Inline Elements
Inline elements usually do not start on a new line when displayed.
Examples: <b>, <td>, <a>, <img>
HTML <div> Element
The HTML <div> element is a block-level element, which is a container that can be used to combine other HTML elements.
The <div> element has no specific meaning. In addition, since it is a block-level element, the browser will show line breaks before and after it.
If used with CSS, the <div> element can be used to set style properties for large content blocks.
Another common use of the <div> element is document layout. It replaces the outdated method of using tables to define layouts. Using <table> elements for document layout is not the correct usage. The purpose of the <table> element is to display tabular data.
HTML <span> Element
The HTML <span> element is an inline element, which can be used as a container for text.
The <span> element has no specific meaning.
When used with CSS, the <span> element can be used to set style properties for part of the text.
HTML Grouping Tags
Tag | Description |
---|---|
<div> | Define a division or section in the document. |
<span> | Define span, used to combine inline elements in the document. |
- Previous Page HTML List
- Next Page HTML Class