HTML Tags You Really Should Know

·

1. <cite>

All of us will be familiar with the <blockquote> tag, but did you know about <blockquote>’s little brother <cite>? <cite> allows you to define the text inside of the element as a reference. Typically the browser will render the text inside of the <cite> tag in italics, but this can be changed with a touch of CSS.
The <cite> tag is really useful for citing bibliographic and other site references. Here’s an example of how to use the cite tag in a paragraph:
David Allen’s breakthrough organization book Getting Things Done has taken the web by storm.

2. <optgroup>

The <optgroup> tag is a great way to add a little definition between groups of options inside a select box. If you needed to group movie listings by time, for example, then it would look like this:
view plaincopy to clipboardprint?
  1. <label for="showtimes">Showtimes</label>  
  2. <select id="showtimes" name="showtimes"> <optgroup label="1PM"></optgroup>  
  3. <option value="titanic">Twister</option>  
  4. <option value="nd">Napoleon Dynamite</option>  
  5. <option value="wab">What About Bob?</option>  
  6.   
  7.  <optgroup label="2PM"></optgroup>  
  8. <option value="bkrw">Be Kind Rewind</option>  
  9. <option value="stf">Stranger Than Fiction</option>  
  10. </select>  
Live demo:

This allows the select list to visually separate the movie listings.

3. <acronym>

The <acronym> tag is a way to define or further explain a group of words. When you hover over text that has the <acronym> tag used, a box appears below with the text from the title tag. For example:
view plaincopy to clipboardprint?
  1. The microblogging site <acronym title="Founded in 2006"> Twitter</acronym> has recently struggled with downtimes.  
Live demo:
SEO is full of trickery and magic.

4. <address>

The <address> tag is quite an obscure little tag, but that doesn’t mean it isn’t useful! As the name implies, <address> allows you to semantically markup addresses in HTML. The nifty little tag will also italicize all of the data within the brackets, though the style can easily be changed through simple CSS.
view plaincopy to clipboardprint?
  1. <address>Glen Stansberry  
  2. 1234 Web Dev Lane  
  3. Anywhere, USA  
  4. </address>  

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.
view plaincopy to clipboardprint?
  1. John <del>likes</del> <ins>LOVES</ins> 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.
view plaincopy to clipboardprint?
  1. <label for="username">Username</label>  
  2. <input id="username" type="text">  

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.
view plaincopy to clipboardprint?
  1. <form>  
  2. <fieldset>  
  3. <legend>Are You Smarter Than a 5th Grader?</legend>  
  4.   
  5. Yes  
  6. <input name="yes" value="yes" type="radio">  
  7.   
  8. No  
  9. <input name="no" value="no" type="radio">  
  10. </fieldset>  
  11. </form>  
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.
view plaincopy to clipboardprint?
  1. <abbr title="Sergeant">Sgt.</abbr> 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:
view plaincopy to clipboardprint?
  1. <a rel="clickable" href="page.html">This link is editable</a>  
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. To see which browsers support the tags check out this article by Quirksmode.
view plaincopy to clipboardprint?
  1. <span>How do you say Supercalifragilistic<wbr>expialidocious?</span>  

Attributes HTML Basic Structure HTML Page Basic Table Tags Basic Text - Font Tags Binary Color Names HTML Color Values HTML Colors HTML Control Characters Conversion Table - Decimal Creating an HTML Page Elements HTML Entities HTML FONT COLOR in HTML FONT FACES in HTML FONT HEADERS in HTML FONT HIDING TEXT/TAGS in HTML FONT LOGICAL STYLES in HTML FONT PHYSICAL STYLES in HTML FONT SIZES in HTML Forms HTML Frames HTML Getting Started HTML head HTML Headings HTML Hexadecimal Horizontal Rule Examples HTML - Bold HTML - Code HTML - Div Element(s) HTML - Font and Basefont HTML - Italic HTML - Layout HTML - Strikethrough HTML -Getting Started HTML / XHTML Standard Event Attributes HTML 4.0 HTML Background HTML Basic HTML Basic - 4 Examples HTML codes HTML Codes - Characters and symbols HTML coding html color codes HTML Elements HTML Fonts HTML Tutorial List Item HTML Codes Form Input HTML Document Javascript Codes Color Code Organizing HTML HTML format HTML Introduction HTML Line Breaks HTML Marquees HTML Ordered HTML Preformatting HTML Reference HTML Style HTML Summary HTML syntax HTML Table Tags Examples II HTML Tag HTML Tags Chart HTML Tags You Really Should Know html tutorial HTML Tutorials HTML Unordered HTML URL Encode HTML URLs HTML valid HTML Webserver Image BORDERS in HTML Image FIXED BACKGROUND in HTML Image HEIGHT WIDTH in HTML Image HSPACE in HTML Image LINKED in HTML Image Map in HTML Images HTML Links HTML Lists HTML Marquee Basic Marquee Code Marquee Codes marquee right now Marquee Status Bar Marquee Tag Examples Marquee tag in html Marquee Tag of HTML marquee tag scrolling text Marquee Title Meta HTML Octal Paragraphs HTML Quick List HTML Scripts HTML Sound Tag Special Characters Struts HTML Tags Styles HTML Tables HTML Text Formatting HTML

What is HTML

free counters