Use of XHTML elements

In linguistics, semantics is the study of the meanings of words, phrases or systems. According to the web terminology of markup languages, semantic concerns the appropriate use of XHTML elements. To put it simple, elements should be used respecting their semantic role within the document and their intended purpose. To avoid the trivial mistake of using an element for its presentational effect, in this article I'll review the most common XHTML elements by providing a short description of their semantic role and scope.

address

We can use this element to insert information about the document's author, namely the person who actually created the document.

blockquote

We can use this element to insert a block-level quotation. The cite attribute (optional) specifies the quotation's source (an URI).

The blockquote element is mainly used for long quotations. We should not use this element to create indentations.

cite

We can use this element to insert the source of a quotation or a reference to another resource.

code

We can use this element to insert fragments of computer code.

dd

We can use this element to insert a definition in a definition list.

del

We can use this element to mark up revised text. The del element marks up the text that has been deleted in a previous revision of the document.

dfn

We can use this element to mark up a term that is to be defined. The dfn element, in fact, defines the first instance of a term in a document.

dt

We can use this element to mark up the definition term in a definition list.

em

We can use this element to add a normal emphasis to text.

h1-h6

We can use these elements (h1, h2, h3, h4, h5, h6) to mark up six decreasing levels of importance for headings, where h1 is the most important level. These elements can be inserted to build the structure of a document by dividing it up into sections and subsections.

ins

We can use this element to mark up the insertion of new text after a revision.

kbd

We can use this element to mark up keyboard characters.

pre

We can use this element to mark up pre-formatted text.

q

We can use this element to mark up short inline quotations. The cite attribute (optional) specifies the quotation's source (an URI).

samp

We can use this element to mark up the result of a program or script.

strong

We can use this element to add a strong emphasis to text.

sub

We can use this element to mark up a subscript.

sup

We can use this element to mark up a superscript.

tt

We can use this element to mark up teletype text.

var

We can use this element to mark up a variable or a program argument.

This entry was posted in by Gabriele Romanato. Bookmark the permalink.

Leave a Reply

Note: Only a member of this blog may post a comment.