5. <ins> and <del> If you're wanting to display editing revisions with with markup, <ins> and <del> are just the ticket. Like the name implies, <ins> highlights what's been added to the document with an underline, and <del> shows what's been taken out with a strikethrough.
John likes LOVES his new iPod.
Live demo:
John likes LOVES his new iPod.
6. <label>
Form elements seem the easiest to forget when marking up a document. Of the form elements, one of the most forgotten is the <label> tag. Not only is it a quick way to note the label's text, the <label> tag can also pass a "for" attribute to specify which element is to be given the label. Not only are these <label> tags great for styling, they also allow you to make the caption clickable for the associated element.
Username
7. <fieldset>
Fieldset is a nifty little attribute that you can add to your forms to logically group form elements. Once applied the <fieldset> tag draws a box around the elements within the fieldset. Bonus points for adding a <label> tag within the fieldset to define the title of the group.
Are You Smarter Than a 5th Grader?
Yes
No
Live demo:
Are You Smarter Than a 5th Grader? Yes No
8. <abbr>
The <abbr> tag is much akin to the <acronym> tag, except the <abbr> tag is only used to define abbreviated words. Just like <acronym>, you define a title within the tag. When a visitor hovers over the abbreviated text, the full definition appears below. The <abbr> tag is rarely used, but the benefits are many for screen readers, spellcheckers and search engines.
Sgt. Pepper's Lonely Hearts Club is my favorite album.
Live demo:
Sgt. Pepper's Lonely Hearts Club is my favorite album.
9. rel
Rel can be an insanely useful attribute, as any HTML element can have a rel applied to it. It's helpful for passing extra variables that aren't otherwise specified. This is helpful when using Javascript with your HTML. If you have a link that you want to edit inline, you might add:
This link is editable
The Javascript might be looking for a link with the rel attribute "clickable", and it knows to apply some Ajax and allow it to be edited inline. This is one of many techniques you can use with the rel attribute, as the possibilities are endless.
10. <wbr>
The <wbr> tag is an incredibly obscure tag. To be honest, I doubt many of you have come into contact with the tag, as it's hardly ever used. (Truthfully, I hadn't seen the tag before I started researching this article.) Essentially, the tag allows you to specify a place where you think a line break might be useful, but only if needed. This tag is unique as it relies on the discretion of the browser to insert the linebreak, if needed. It's perfect for creating layouts that you want to avoid having horizontal scrollbars.
If you were wanting to achieve the same effect but without using the <wbr> tag, you could also try or **. It should be noted that none of these tags have full support across all browsers.
How do you say Supercalifragilisticexpialidocious?
Author: Glen Stansberry