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.

Our blog

Some random stories from our blog.

The Impact of the recent EMD update on search engine optimisation

EMD, or Exact Matched Domain, has always been an extremely important process for businesses as they first venture online. With the recent EMD update how should we be thinking as an industry about the way we manage accounts in the future? Put simply, an EMD is an exact keyword used within a domain for instance, if you were purchasing a website domain for an accountant in Bristol, you could use the domain bristolaccountants.co.uk. A brand domain on the other hand would use the name of the company instead. In the past, companies that were purchasing domain names for new websites would choose exact domains in relation to the keyword that they were specifically targeting, giving them an almost certain chance of appearing within the higher echelons of the Google search rankings. With the latest EMD updates things are changing and search engine optimisation professionals may have to tweak their approach.…

Im going on a browser hunt, Im not scared

Google recently made the decision to end support for Microsoft Internet Explorer version 6 for its online office based applications. What wasn’t shouted quite so loudly was the ending of support for Firefox 2 and Chrome 3. In an online world where technologies evolve on a daily basis, should we worry about when old technology standards die or should we embrace in a lemming like state anything Google or Microsoft choose to throw at us? It’s alive With the invention of the internet as we know it today it wouldn’t be long before tools to view this brave new world became available. The pioneers were Microsoft and Netscape, but these were not the only ones, but due to Microsoft bundling its browser with its operating system Windows, it quickly became the browser of convenience for all but the very determined. But Microsoft was never going to have its own way…

The <cite> html tag

Overview The <cite> HTML tag is known as a phrase tag, it is mainly used to style text. By default it displays text as italic which is ideal for showing a quotation or citation. 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 <cite> tag it is displayed as a citation text. Basic Usage <cite>Some citation text in here</cite> Any text between the opening and closing tag will be displayed as citation text. Advance Usage It is possible to style and add functionality to the <cite> tag, this is done by adding an attribute to after the cite in the opening <cite> tag Attributes allowed for the <cite>tag include :-class, dir,…

Case Study – Inyanga Counselling

Therapy and crisis counselling still is stigmatised by many, which made the design and creation of the site interesting as well as being a very worthwhile project to be involved in. At the initial brief it was very clear that counselling is not only a very personal service but the service is used by all levels of society and as such the site needed to reflect this. Using warm neutral visuals that complimented the colour and feel of the logo was matched by a very personal blog style site, which allowed people visiting the site to know they were dealing with a real qualified person. As with all sites developed by Websites by Mark both large and small, the same quality and care is shown and this was indeed the same in Mary’s case. As with many of Websites by Marks projects, design and build was complete on time and…

The <h1> html tag

Overview In HTML h tags stand for heading and this is split into 6 different h tags (h1, h2, h3, h4, h5 and h6). The <h1> tag itself is considered to be the main heading for a webpage. By default it is not only displayed bigger than the body and other h tags, but in seo is considered an important ranking factor.When text is put between the opening and closing <h1> tag it is displayed as the main heading. A <h1> tag is only meant to be used once on a webpage, but if you code a webpage with more than one <h1> tag it will still display corectly. Basic Usage <h1>Main header text</h1> Any text between the opening and closing tag will be displayed as a main heading. Advance Usage It is possible to style and add functionality to the <h1> tag, this is done by adding an attribute…

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