Coding Clean and Semantic Templates

How you can write clean HTML code by using semantic markups and minimize the use of div tag.

If you are the guy who uses <div> tag for everything, this post is for you. It focuses on how you can write clean HTML code by using semantic markups and minimize the use of <div> tag. Have you ever edited someone’s templates, don’t those messy tags drive you crazy? Not only writing clean templates can benefit yourself, but your team as well. It will save you time when you have to debug and edit (particularly the large projects).
  • Minimize the use of <div> tags.
  • You should only use the <div> tag for the main layout sections such as: header, content, sidebar, and footer.
  • The content should be in semantic HTML tags, not <div> tags.
  • Format the source code and label the closing </div> tags.

Patrick Julicher

Patrick JulicherPatrick started developing websites at the age of 25, only using HTML and building simple websites. Through the years his passion for designing and developing grew, and his career moved in that direction in the year 2004, when he decided to try and get a job in ICT and Web Development.
He got this chance at WE ICT, based in Nijmegen, The Netherlands. For the first couple of years he combined network management for customers with creating database-driven websites in ASP. Since 2008 his main work is on the developing part.
While ASP is still his favorite language, he's slowly trying to dive into ASP.NET and discover all of the possibilities.

See All Postings From Patrick Julicher >>

Comments

Be the first to write a comment

You must me logged in to write a comment.