Quantcast
Channel: Web Usability » web2usability
Viewing all articles
Browse latest Browse all 10

Best Practices of HTML

$
0
0

1. Doctypes
By using a certain DOCTYPE (strict or transitional) you claim to have correctly implemented a certain (X)HTML flavor:
2.XHTML
Make all your tags lower case (<p> instead of <P>);
Close all your tags, even empty ones (<br /> and <hr /> instead of<BR> and <HR>);
Make all attribute names lower case and quote all attribute values; and onmouseover instead of onMouseOver;
Give empty attributes a value—such as <input type=”checkbox” checked=”checked” /> instead of <INPUT TYPE=checkbox CHECKED>;
3. Black List
Some HTML tags have been deprecated. There are excellent CSS equivalents
4. Put Stylesheets at the Top
5. Put Scripts at the Bottom
6. Make JavaScript and CSS External
7. Avoid Redirects
8. Minimize the Number of iframes
9. No 404s
10. Choose <link> over @import
11. Optimize Images
13. Don’t Scale Images in HTML
14. Make favicon.ico Small and Cacheable
15. Keep Components under 25K
16. Never Use Inline Style
17. Never Use Inline Javascript.
18. Tag Names Lowercase19. Use H1 – H6 Tags
20. Wrap Navigation with an Unordered List
21. All Images Require “Alt” Attributes
22. Validate Continuously


Posted in Usability

Viewing all articles
Browse latest Browse all 10

Trending Articles