Semantic Markup and Semantic Coding Guidelines for SEO

As a web designer, you want your website design to look good and be aesthetically pleasing to the eye. Think of semantic coding as making the content on your website aesthetically pleasing to search engines like Google and Yahoo.

Semantic markup (or Semantic coding) is the practice of programming your website so that the code used is descriptive and representative of the information it contains. For example, instead of using code like this:

<div id="page-title">
Hi, my website is about Semantic markup
</div>

You would want to use standardized markup tags which describe the content, like this:

<h1>Hi, my website is about Semantic markup</h1>

What’s the difference? <div> tags (and similarly <span> tags) are generic elements and don’t represent any inherent meaning. <h1> heading tags are used to define page headings, and google and other search engines look for such tags to define the contents on your web page. By using an <h1> tag instead of a generic <div> tag you are telling Google “pay attention to the text inside these tags - it is important.”

OK, so you think you have a lot of important content on your web page so why not start every new paragraph with an <h1> tag? It doesn’t quite work that way. <h1> tags should only be used once on a page, to define the title and/or purpose of the page. It should be very close in meaning to the <title> tag of your page. For subheadings on the page, you should be using <h2> <h3> <h4> <h5> <h6> header tags, in order of descending importance.

Another common pitfall is ordering lists. Instead of just listing items with a <br> tag in between them, use the more appropriate <ul> (Unordered List) tag with <li> elements for each item. If you need to display a list of numbered items (i.e., 1, 2, 3) use the <ol> Ordered List tag with <li> elements.

For bold or emphasized text, use <strong> or <em>, instead of the less descriptive <b> and <i> tags.

Paragraphs, of course, should always be wrapped in <p> tags. By default, <p> paragraph tags will begin a new line, so there is no need to add extra <br> tags to anything for spacing. (Note, never use <p> or <br> tags just for spacing. Use the margin and/or padding attributes of the <p> tag in your CSS code to add visual spacing).

The following is a list of semantic code elements which you can use to better describe your website content:

ABBR and ACRONYM: For Abbreviations and Acronyms. They have an accompanying title tag which you can use to describe the actual meaning of the abbreviated word or acronym.

CITE: Citation, used to cite a source of information.

CODE: Computer or Programming code.

DEL: Deleted word or phrase.

DFN: Definition.

DL: Definition List. Similar to UL and OL, but uses DT (Definition term) and DD (definition description) to show terms and definitions.

EM: Emphasis, displayed as italicized text.

INS: Insert, used to display text you have inserted due to an edit at a later date.

KBD: Keyboard instructions.

OL: Ordered List.

SAMP: Sample output, used to show sample output from programming code.

UL: Unordered List.

VAR: Variable, used to represent a variable in programming code.

STRONG: Strong, or bold, emphasis on a word or phrase.

Read the next Article in this Series: Why You Should Use SEO Semantic Coding and Semantic Markup

Now go out and bombard the interweb with my self-whoring social links:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Ma.gnolia
  • MisterWong
  • StumbleUpon
  • Technorati
  • LinkaGoGo

Tags: marketing, optimization, programming, search engines, semantic coding, semantic markup, seo

Similar Posts:

Comments

5 Responses to “Semantic Markup and Semantic Coding Guidelines for SEO”

  1. SEO Best Practices for Coding Your Website SEO Best Practices for Coding Your Website on July 9th, 2008 7:01 pm

    [...] are some great semantic coding guidelines, courtesy of Barry [...]

  2. Jake Jake on August 28th, 2008 3:40 am

    Great, informative website. Wondered if anyone could have a look at my website which is in xhtml to see what I can do to improve my rankings. http://www.skylanterns2u.com.

    Regards
    Jake

  3. Barry Wise Barry Wise on August 28th, 2008 12:35 pm

    Jake;
    Your site is in HTML 4.01, not XHTML, as you can see in your first declaritive statement.

    You have a SEVERE problem with your home page. Your site returns a 200 http status code in the header at http://www.skylanterns2u.com/, but then the page redirects the user to a new URL, http://skylanterns2u.com/home/home.php. This is very bad, use a header code of 301 to do the redirect, not whatever it is you are using (meta refresh or javascript, etc.)

    There are some things you can do to improve on-page SEO factors with semantic coding, but first you have to clean up the code. The W3C HTML validator returns 51 errors in the page markup:
    http://validator.w3.org/

  4. Michael Michael on October 27th, 2008 8:01 pm

    Great information to know. I never knew that strong was counted more than the b tag. Great place to start and definitely making a site XHTML compliant can only help with your ranking.

  5. Dave Dave on December 3rd, 2008 6:08 pm

    Can one do this in markup?

    content text goes here

Leave a Reply