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, see my 2005 post Folksonomies on Slashdot: revised, restated and summarized for more.
  • 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?

2010 Update : One to add is the short link microFormat. Flickr, YouTube, TechCrunch and all WordPress blogs already use this rel=”shortlink” mircoFormat. found via the Show Short Link GreaseMonkey Script

2010 Aug Update : another one to add is the rel link for a webpage icon for Web Clip, similar to favicons, using rel=”apple-touch-icon” in order to set the home screen icon on your iPhone and iPod Touch and iPad devices.

1
<link rel="apple-touch-icon" href="/customIcon.png"/>

If you don’t want Safari on iOS to add any effects to the icon, replace “apple-touch-icon” with “apple-touch-icon-precomposed”. See Configuring Web Applications in the Safari Dev Center for more.

You can also minimize the status bar that is displayed at the top of the screen on iPhone OS, making it more like a “a native application” by using a meta tag “apple-mobile-web-app-status-bar-style”.

Note: you have to save the app to your home screen for these to work.

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

One Comment

  1. Posted June 17, 2010 at 9:48 am | Permalink

    I try to make my websites compatible to the semantic web as possible, but it requires a lot of work. So for small websites it is not worth the time.

Post a Comment

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

*
*
  • Follow

  • Archives (since 2003)

  • Categories

  • Recent Posts

  • Twitter Updates

    • I liked a YouTube video -- Recycle your unwanted electronics - City of Toronto http://youtu.be/91OXkMkesBc?a 14 hours ago
    • I'm organizing and coordinating my Japan Trip with Google Wave. Seeing both the promise and the fail. of the product. 19 hours ago
    • I have failed my saving Throw against Shiny ... I new 32G iPod Touch is on order :) 1 day ago
  • del.icio.us links

    • No bookmarks avaliable.
  • Flickr

    Hanging Gardens of KensingtonHanging Gardens of KensingtonMore Chocolate CakeMore Chocolate Cake
  •  

    March 2009
    M T W T F S S
    « Feb   Apr »
     1
    2345678
    9101112131415
    16171819202122
    23242526272829
    3031  
  • Spam Blocked