HTML Best Practices
When producing HTML for a web project at Yoobee School of Design, you should:
- Use the correct HTML5 doctype
- Validate HTML http://validator.w3.org/
- Don’t use deprecated tags
- Remove redundant tags and commented out tags
- Don’t use HTML for styling purposes
- Use the alt attribute for all images
- Format your code
- Ensure all file, image and anchor links work
- Use a consistent HTML structure for all pages unless justified
- Delivered markup as utf-8 (the most friendly for internationalisation)
- Don’t use tables for layout unless justified
- Don’t use div or p tags for lists unless justified
- Use label fields to label each form field
- If nesting views across files (like in some Wordpress templates), use HTML comments to indicate which elements you’re closing
- Don’t use images where CSS styles could be used instead
- Use title-case for headers and titles and use CSS to apply all caps or all lowercase, i.e. text-transform:uppercase/lowercase