HTML Tags and REL attributes You Really Should Know

via Net tuts+ 10 Rare HTML Tags You Really Should Know is a timely reminder (especially since IE 8 is just out), of some basic HTML markup that you really should know.

in particular there are several tag you really need to know :

  • the <optgroup> tag,  for grouping of options inside a select box.
  • the <label> tag, to note the label’s text,  can also pass a “for” attribute to specify which element is to be given the label, and make the caption clickable for the associated element.
  • the <fieldset> tag, to logically group form elements.   Once applied  tag draws a box around the elements within the fieldset, by default styling.
  • the <wbr> tag, is used to specify a place where you think a line break might be useful, but only if needed.

They missed the “no break” or <nobr> tag, which prevents any line breaks from occurring in a flow of text, which I had need of when working with picky marketing people at “Brand Name” split over two lines.

update : james herdman pointed out to me that <abbr> isn’t supported by IE5 and IE6.   (See Styling abbreviations and acronyms for more information on <abbr> and <acronym>.)  And that a few organization are still stuck in the 90’s with their use of ie 6 (shutter).

The Net Tut’s article also included the “Rel” html attribute of the anchor link tag.    It’s example of rel=”clickable” is a new one for me.  I would think that a class name would be fine or better.

REL attributes are heavily used in microformats and these are some of the more common ones:

  • is used for web page tag or folksonomy.
  • is used identifying pages about “me”, in the building XFN (XHTML Friends Network) data or profile aggregation.
  • means that search engines SHOULD NOT afforded any additional weight or ranking to the linked to web page.
  • rel=”home” to a hyperlink, used for site navigation purposes, links to the homepage of the site in which the current page appears.
  • rel=”ext” to define a link as being to an external website.

Also used is rel=”Next” and rel=”Prev”  which are a little different as they are part of the W3 Basic HTML data types and refer to the next or Previous documents in a linear sequence of documents, and may be used be user agents to preload the “next” or “previous” document to reduce the perceived load time.  (I’ve seen them used by Grease Monkey scripts to give you a bottomless page effect)

See this list of existing rel values which collects all known HTML rel values from specifications, formats, proposals, brainstorms, and non-trivial POSH (Plain Old Semantic HTML) usage in the wild.

Any other useful but obscure tag’s and attributes we should know?

This entry was posted in Semantic, Web. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*