Elements

On a fundamental level, every HTML document is a hierarchical structure made up of elements and their content. This section of the reference describes all the different types of element that you can use to write an HTML document.

Structural Elements:

The elements in this section are used to provide structure in a web page, for instance, indicating sections on a page with a heading, creating a paragraph, and so on. These are the basic building blocks that you’ll find yourself using on any web page.

blockquote:
Used to indicate a block of quoted text, with an attribution that identifies who said or wrote it

body:
Contains all the content to be displayed to user

br:
Creates a single line break in a block of text

div:
Divides a page into separate sections

h1:
Defines a level 1 heading

h2:
Defines a level 2 heading

h3:
Defines a level 3 heading

h4:
Defines a level 4 heading

h5:
Defines a level 5 heading

h6:
Defines a level 6 heading

head:
Identifies the head section of document

hr:
Creates a horizontal rule that might be used to delineate areas of content in a document

html:
Identifies the content of the document as HTML

p:
Indicates a paragraph of text

Head Elements

The elements listed in this section are all contained within the head element, and either provide extra information about the page, or reference other resources that are required for the page to display or behave correctly.

base:
Specifies a base URL for all relative URLs contained in the document

link:
Defines the relationship between the current document and other documents or resources

meta:
Provides general information about a document for indexing and other purposes

script:
Contains (or refers to) statements in a scripting language that are to be processed on the client side

Style:Contains CSS style information that’s embedded into a page

title:Defines the title of the web page or document

List Elements

This section includes all the elements related to lists—ordered lists, unordered lists, and the less-common definition list—as well as the attributes that are unique to these elements.

dd:
describes a term in a definition list

dir:
used to define a multicolumn directory listing

dl:
Creates a definition list for lists comprising item: description pairings

dt:
Defines a definition term used in a definition list

li:
Indicates an individual item in a list

menu:
Used to define a list of menu choices

ol:
An ordered list of items/text

ul:
An unordered list of items or text


Text Formatting Elements

This is easily the largest section in this reference, in terms of the number of elements that it includes. The text formatting elements listed here range from the extremely useful and oft-used em(emphasis) and strong (strong emphasis), through the peculiar and little-known Ruby markup elements (ruby, rb, rbc, and so on), to the deprecated elements from days long gone, which includemarquee, tt, and big/small.

All the elements included here are Inline and Phrase Elementselements—they can’t be wrapped around any Block-level Elements(with the exception of del and ins, whose properties allow them a special dispensation).

The span element is also listed here. Strictly speaking, it’s not a text formatting element, as it doesn’t offer any semantic information on its own. That said, the span can’t be wrapped around a block element, and is primarily used to surround text content for the purposes of styling or scripting. It is for this reason that it has been included in this index rather than in theStructural Elements.


No comments:

Post a Comment