Thursday 19 April 2012

Some Special tags present in HTML 4.0.1 -Part2

Dd:

The <dd> tag is supported in all major browsers.

The <dd> tag is used to describe an item in a definition list.

The <dd> tag is used in conjunction with <dl> (defines the definition list) and <dt> (defines the item in the list).

Inside a <dd> tag you can put paragraphs, line breaks, images, links, lists, etc.
<html>
<body>
<dl>
  <dt>Coffee</dt>
  <dd>- black hot drink</dd>
  <dt>Milk</dt>
  <dd>- white cold drink</dd>
</dl>
</body>
</html>

Result:
Del:

The <del> tag is supported in all major browsers.

The <del> tag defines text that has been deleted from a document.

Tip: Also look at the <ins> tag to markup inserted text.

Browsers will normally strike a line through deleted text and underline inserted text.

<html>
<body>
<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
<p>Notice that browsers will strikethrough deleted text and underline inserted text.</p>
</body>
</html>

Result:



Fieldset:

The < fieldset > tag is supported in all major browsers.

The <fieldset> tag is used to group related elements in a form.

The <fieldset> tag draws a box around the related elements.

Tip: The <legend> tag defines a caption for the <fieldset> element.

<html>
<body>
<form>
<fieldset>
<legend>Personalia:</legend>
Name: <input type="text" /><br />
Email: <input type="text" /><br />
Date of birth: <input type="text" />
</fieldset>
</form>
</body>
</html>

Result:



q:

The <q> tag is supported in all major browsers.

The <q> tag defines a short quotation.

Browsers often insert quotation marks around the quotation.
<html>
<body>
<p>WWF's goal is to:
<q>build a future where people live in harmony with nature</q>.
</body>
</html>

Result:
WWF's goal is to: build a future where people live in harmony with nature.

sub and sup:

The <sub> tag defines subscript text. Subscript text appears half a character below the baseline. Subscript text can be used for chemical formulas, like H2O.
The <sup> tag defines superscript text. Superscript text appears half a character above the baseline. Superscript text can be used for footnotes, like WWW[1].

<html>
<body>
<p>This text contains <sub>subscript</sub> text.</p>
<p>This text contains <sup>superscript</sup> text.</p>
</body>
</html>

Result:
This text contains subscript text.
This text contains superscript text.

No comments:

Post a Comment