Most of the web pages you encounter is presented to you via HTML, the world wide web’s markup language. In this article, I will share with you 20 best practices that will lead to clean and correct markup.
- Always Declare a Doctype
- Use Meaningful Title Tags
- Use Descriptive Meta Tags
- Use Divs to Devide Your Layout into Major Sections
- Separate Content from Presentation
- Minify and Unify CSS
- Minify, Unify and Move Down JavaScript
- Use Heading Elements Wisely
- Use the Right HTML Element at the Right Place
- Don't Use Divs for Everything
- Use an Unordered List (<ul>) for Navigation
- Close Your Tags
- Use Lower Case Markup
- Use Alt Attributes with Images
- Use Title Attributes with Links (When Needed)
- Use Fieldset and Labels in Web Forms
- Use Modular IE Fixes
- Validate Your Code
- Write Consistently Formatted Code
- Avoid Excessive Comments
Comments
Be the first to write a comment
You must me logged in to write a comment.