HTML relies on several elements to provide structure to a document (as opposed to structuring the text within), as well as provide information that is used by the browser or search engines. <bdo>...</bdo> Usage | The bidirectional algorithm element is used to selectively turn off the default text direction. Default text direction is left to right, but can be changed (to render Hebrew text from right to left, for example). | Start/End Tag | Required/Required. | Attributes | lang="..."The language of the document. dir="..."The text direction (ltr, rtl). | Empty | No. | Notes | The dir attribute is mandatory. |
<body>...</body> Usage | Contains the content of the document. | Start/End Tag | Optional/Optional (HTML); Required/Required (XHTML 1.0). | Attributes | %coreattrs, %i18n, %events. | | onload="..."Intrinsic event triggered when the document loads. | | onunload="..."Intrinsic event triggered when document unloads. | Deprecated | The following presentational attributes are deprecated in favor of setting these values with style sheets: | | background="..."URL for the background image. | | bgcolor="..."Sets background color. | | text="..."Text color. | | link="..."Link color. | | vlink="..."Visited link color. | | alink="..."Active link color. | Empty | No. | Notes | There can be only one body, and it must follow the head. The body element can be replaced by a frameset element. |
Comments <!-- .. --> Usage | Inserts notes or scripts that are not displayed by the browser. | Start/End Tag | Required/Required. | Attributes | None. | Empty | Yes. | Notes | Comments are not restricted to one line and can be any length. The end tag is not required to be on the same line as the start tag. |
<div>...</div> Usage | Division element is used to add structure to a block of text. | Start/End Tag | Required/Required. | Attributes | %coreattrs, %i18n, %events. | Deprecated | The align attribute is deprecated in favor of controlling alignment through style sheets. | | align="..."Controls alignment (left, center, right, justify). | Empty | No. | Notes | Cannot be used within a P element. |
<!DOCTYPE...> Usage | Version information appears on the first line of an HTML document and is a Standard Generalized Markup Language (SGML) declaration rather than an element. | Notes | Optional in HTML documents, but required in XHTML 1.0. |
<h1>...</h1> Through <h6>...</h6> Usage | The six headings (H1 is the uppermost or most important) are used in the body to structure information in a hierarchical fashion. | Start/End Tag | Required/Required. | Attributes | %coreattrs, %i18n, %events. | Deprecated | The align attribute is deprecated in favor of controlling alignment through style sheets. | | align="..."Controls alignment (left, center, right, justify). | Empty | No. | Notes | Visual browsers display the size of the headings in relation to their importance, with H1 being the largest and h6 the smallest. |
<head>...</head> Usage | This is the document header and contains other elements that provide information to users and search engines. | Start/End Tag | Optional/Optional (HTML); Required/Required (XHTML 1.0). | Attributes | %i18n. | | profile="..."URL specifying the location of meta data. | Empty | No. | Notes | There can be only one head per document. It must follow the opening html tag and precede the body. |
<hr> Usage | Horizontal rules are used to separate sections of a web page. | Start/End Tag | Required/IllegalSee note for XHTML 1.0 requirements. | Attributes | %coreattrs, %events. | Deprecated | align="..."Controls alignment (left, center, right, justify). | | noshade="..."Displays the rule as a solid color. | | size="..."The size of the rule. | | width="..."The width of the rule. | Empty | Yes. | Notes | In XHTML 1.0, this tag should take the XML form of <hr /> to ensure compatibility with older browsers. |
<html>...</html> Usage | The html element contains the entire document. | Start/End Tag | Optional/Optional (HTML); Required/Required (XHTML 1.0). | Attributes | %i18n. | Deprecated | version="..."URL of the document type definition specifying the HTML version used to create the document. | Empty | No. | Notes | The version information is duplicated in the <!DOCTYPE...> declaration and therefore is not essential. |
<meta> Usage | Provides information about the document. | Start/End Tag | Required/IllegalSee note for XHTML 1.0 requirements. | Attributes | %i18n. | | http-equiv="..."HTTP response header name. | | name="..."Name of the meta information. | | content="..."Content of the meta information. | | scheme="..."Assigns a scheme to interpret the meta data. | Empty | Yes. | Notes | In XHTML 1.0, this tag should take the XML form of <meta /> to ensure compatibility with older browsers. |
<span>...</span> Usage | Organizes the document by defining a span of text. | Start/End Tag | Required/Required. | Attributes | %coreattrs, %i18n, %events. | Empty | No. |
<title>...</title> Usage | This is the name you give your web page. The title element is located in the head element and is displayed in the browser window title bar. | Start/End Tag | Required/Required. | Attributes | %i18n. | Empty | No. | Notes | Only one title allowed per document. |
|