the <dfn> html tagWebsites by Mark - 7 Woodrush gardens, Carterton, Oxfordshire. OX18 1JE

the <dfn> html tag
the <dfn> html tag

The <dfn> html tag

Overview

The <dfn> HTML tag is known as a phrase tag, it is mainly used to style text. By default it makes text italic to illustrate that the tag text is a definition. It works equally as well in table based layouts as well as CSS based ones. As with all phrase based HTML tags it can be used in situations where consistancy between browsers is difficalt to acheive in other ways. When text is put between the opening and closing <dfn> tag it is displayed as a definition text.

Basic Usage

<dfn>Some definition text in here</dfn>
Any text between the opening and closing tag will be displayed as a definition text.

Advance Usage

It is possible to style and add functionality to the <dfn> tag, this is done by adding an attribute to after the p in the opening <dfn> tag
Attributes allowed for the <dfn>tag include :-class, dir, id, lang, style and title.
In most cases class and id are used and its basic usage is shown below
<dfn id=”header”>Some definition text</dfn>
With all attributes there is a space after the initial p then the attribute name, then an equal’s sign and the identifier of the attribute in double quotes.
Both id and class attributes refer to CSS styling of the element and is either stored in the <head> of the webpage on in an external file.
With id this usually refers to a single instance on a page where as class usually refers to a repeating element on a page, it is for this reason for the <dfn> tag may use either the id or class as an atribute.
The attribute style allows you to include css style information for a single <dfn> tag.
The dir attribute allows for left reading and right reading text, lang allows you to specify a language for the tag and title allows you to include extra information for a tag.
It is possible to attach scripts to tags, as well adding functionality to a webpage, these scripts tend to be written in Javascript and therefore outside the scope of this document

Examples

<dfn>Some definition text</dfn> – basic usage example.
<dfn id=”header>Some definition text</dfn> – definition text which is styled by the id header.
<dfn class=”headerclass”> Some definition text </dfn> – definition text which is styled by the class headerclass.
<dfn id =”header” class=”headerclass”> Some definition text </dfn> – definition text which is styled by the class headerclass and the id header.
<dfn style="color:#F00">Some definition text</dfn> – definition text which has a custom colour of red.
<dfn dir="rtl">Some definition text</dfn> – definition text where the text reads from right to left.
<dfn lang="uk">Some definition text</dfn> – definition text where the language has been tagged as UK.
<dfn title="ptitle">Some definition text</dfn> – definition text where the tag has been titled ptitle.

Final Thoughts

Touching on just the surface of the <dfn> HTML tag it is easy to see how versatile it is. To take full advantage of it an understanding of CSS is an advantage.

Website for £99

Offers

 

Categories

 

Our blog

Some random stories from our blog.

Will Yell kill off your local SEO Company?

UK based Yell.com the internet arm of the yellow pages directory has been slowly moving to increase what services it offers to the online world. Recently it unleashed SEO Web Pages to a limited amount of clients. This service offers the promise of professional SEO for all those who pay for advertising with Yell. Is this a breakthrough service or do SEO companies have nothing to fear? Video killed the radio star Back in 1883 a USA company made the decision to print its business directory on yellow paper due to paper supply and the Yellow Pages as we know it today was born. Since then the popularity of the publication has gone from strength to strength and is available in many countries across the world. Indeed before Google, if you wanted to advertise a product or service the Yellow Pages was the platform of choice. Next generation platform Within…

MasterCard’s master plan to take over the world.

The <dfn> html tag

How expensive is your free marketing?

The <h4> html tag

© 2011 Websites by Mark. Do not reproduce any part of with website without permission.
Email : mark@websitesbymark.co.uk - Phone : 07716 447228 / 01993 221500
Postal Address : 7 Woodrush Gardens, Carterton, Oxfordshire. OX18 1JE