XHTML Tag List

XHTML Tag List

  • XHTML tags are used to mark-up XHTML elements
  • Tags in XHTML are always surrounded by characters < and >
  • These characters are called angel brackets
  • All tags in XHTML come in pairs for example <b> and </b>
  • In these pair of tags,the first tag is the start tag,and the second tag is called end tag
  • The text that lies between the start tag and the end tag is called the element content
  • XHTML tags are case sensitive,

DTD: indicates in which XHTML 1.0 DTD the tag is allowed. S=Strict, T=Transitional, and F=Frameset

Tag Description DTD
<!–…–> Defines a comment STF
<!DOCTYPE> Defines the document type STF
<a> Defines an anchor STF
<abbr> Defines an abbreviation STF
<acronym> Defines an acronym STF
<address> Defines an address element STF
<applet> Deprecated. Defines an applet TF
<area> Defines an area inside an image map STF
<b> Defines bold text STF
<base> Defines a base URL for all the links in a page STF
<basefont> Deprecated. Defines a base font TF
<bdo> Defines the direction of text display STF
<big> Defines big text STF
<blockquote> Defines a long quotation STF
<body> Defines the body element STF
<br> Inserts a single line break STF
<button> Defines a push button STF
<caption> Defines a table caption STF
<center> Deprecated. Defines centered text TF
<cite> Defines a citation STF
<code> Defines computer code text STF
<col> Defines attributes for table columns STF
<colgroup> Defines groups of table columns STF
<dd> Defines a definition description STF
<del> Defines deleted text STF
<dir> Deprecated. Defines a directory list TF
<div> Defines a section in a document STF
<dfn> Defines a definition term STF
<dl> Defines a definition list STF
<dt> Defines a definition term STF
<em> Defines emphasized text STF
<fieldset> Defines a fieldset STF
<font> Deprecated. Defines text font, size, and color TF
<form> Defines a form STF
<frame> Defines a sub window (a frame) F
<frameset> Defines a set of frames F
<h1> to <h6> Defines header 1 to header 6 STF
<head> Defines information about the document STF
<hr> Defines a horizontal rule STF
<html> Defines an html document STF
<i> Defines italic text STF
<iframe> Defines an inline sub window (frame) TF
<img> Defines an image STF
<input> Defines an input field STF
<ins> Defines inserted text STF
<isindex> Deprecated. Defines a single-line input field TF
<kbd> Defines keyboard text STF
<label> Defines a label for a form control STF
<legend> Defines a title in a fieldset STF
<li> Defines a list item STF
<link> Defines a resource reference STF
<map> Defines an image map STF
<menu> Deprecated. Defines a menu list TF
<meta> Defines meta information STF
<noframes> Defines a noframe section TF
<noscript> Defines a noscript section STF
<object> Defines an embedded object STF
<ol> Defines an ordered list STF
<optgroup> Defines an option group STF
<option> Defines an option in a drop-down list STF
<p> Defines a paragraph STF
<param> Defines a parameter for an object STF
<pre> Defines preformatted text STF
<q> Defines a short quotation STF
<s> Deprecated. Defines strikethrough text TF
<samp> Defines sample computer code STF
<script> Defines a script STF
<select> Defines a selectable list STF
<small> Defines small text STF
<span> Defines a section in a document STF
<strike> Deprecated. Defines strikethrough text TF
<strong> Defines strong text STF
<style> Defines a style definition STF
<sub> Defines subscripted text STF
<sup> Defines superscripted text STF
<table> Defines a table STF
<tbody> Defines a table body STF
<td> Defines a table cell STF
<textarea> Defines a text area STF
<tfoot> Defines a table footer STF
<th> Defines a table header STF
<thead> Defines a table header STF
<title> Defines the document title STF
<tr> Defines a table row STF
<tt> Defines teletype text STF
<u> Deprecated. Defines underlined text TF
<ul> Defines an unordered list STF
<var> Defines a variable STF
<xmp> Deprecated. Defines preformatted text

7-XHTML Standard Attributes

Just adding text limits the the way of creating web pages. Tags have attributes and they also accept style rules which modify their functions, this gives XHTML it utility.

The rules of XML and rules for general attributes should be kept in mind while using attributes.

The rules are as follows:

  • At the opening of the element tag only the attribute must be specified.

closing tag of an element merely contains a back slash and tag name.

  • All attribute names must be in lower case.
  • All attributes must have a value.
  • All attribute should hold a values and always be double quotes. Here double quote and two single quotes are not the same.
  • All attributes must be placed in a list seperated by blank space and no other characters must be included between them

Attributes are divided into categories, among thes some of them overlap. These can be grouped as follows:

  • Universal/Core Attributes

Including the <body> tags, almost all tags that come in the body are held under this category. These are informational, or they associate the element with information which is elsewhere in the document.

  • Events

Based on the user actions or browser these are used to invoke scripts. For example using onmouseover attribute to create rollover effects in a document. They are used in JavaScript extensively,

  • Presentational or Styling Attributes

Presentational or Styling attributes are the attributes that are used to change the way in which an element is to be displayed on the screen. They are deprecated into style sheets, To code for backward compatibility we should know them well.

  • Tag-Specific Attributes

Attributes which are concerned to a given tag or group of tags are called Tag-specific attributes. Certain tags like <img>tag, does not hold any meaning without attributes. Therefore we do discuss these attributes in relation to the tags they apply to.