Nov 23, 2008

Make you web more semantic

Here are some guidline how to make your web page more sematic.

  1. Use only one

    tag per page, and use it to identify the main topic of the page. Think of it as a chapter title: you only put one title per chapter. Using

    correctly has the added benefit of helping the page get properly indexed by search engines

  2. Use headings to indicate the relative importance of text. Again, think outline. When two headings have equal importance in the topic of your page, use the same level header on both. If one is less important or a subtopic of the other, then use the next level header. For example, follow a

    with a

    tag. In general, it's good to use headings in order and try not to skip heading numbers. For example, don't follow a

    tag with a

  3. Use the

    tag for, duh, paragraphs of text.

  4. Use numbered lists to indicate steps in a process, or define the order of a set of items.
  5. To create a glossary of terms and their definitions or descriptions, use the
    (definition list) tag in conjunction with the
    (definition term) and
    (definition description) tags.
    Black hot drink
    White cold drink
  6. If you want to include a quotation like a snippet of text from another Web site, a movie review, or just some wise saying of your grandfather's, try the
    tag for long passages, or the tag for one-liners.
  7. Take advantage of obscure tags like the tag for referencing a book title, newspaper article or Web site, and the
    tag to identify and supply contact information for the author of a page (great for a copyright notice).
  8. steer clear of any tag or attribute aimed just at changing the appearance of a text or image.
  9. When there just isn't an HTML tag that fits the bill, but you want to identify an element on a page or a bunch of elements on a page so that you can apply a distinctive look, use the
    and tags .
  10. Remember to close tags. The opening

    tag needs its partner in crime (the closing

    tag), as do all other tags, except the few self-closers like
    and .
  11. Validate your pages with the W3C validator. Poorly written or typo-ridden HTML causes many weird browser errors.

No comments:

Post a Comment