Writing clean and semantically correct HTML

Web Designer Wall people has writen a post titled Coding Clean and Semantic Templates that basically gives some advices on how to write proper HTML code for templates.

Briefly, the list of advices that they give are:

  • Minimize the use of  <div>
  • Use  the <div> tag only  for the layout: header, content, sidebar, and footer
  • Use semantic HTML for the content of the site (h1,h2,…p,…, strong,…), avoid using <div> for everything
  • Format (indent) your HTML code, and add a comment when you close the </div> tags

To the previous list I will add that sometimes using tables simplifies the development and the CSS, so don’t be afraid of using tables.

Finally, the post is interesting and can be read quickly, so have a look if you have 5 minutes.

Trackback URL

, , ,

Comments are closed.