8. <div>My headline <br/></br></div> <div>Sub headline</div> <div>A paragraph</div> <h1> My headline </h1> <h4> Sub headline </h4> <p> A paragraph </p> rather than
26. Use a class 1. The style is used in various places throughout the document. 2. The style is very general. <span class= " alert "> <span class= " alert error "> <h2 class= " headline ">
27. Use an ID 1. The style is only used once ever in the document. 2. The style is specific to a certain area of the document. <div id= " header "> <body id= " home "> <body id= " home page ">
28. ID and class can be friends <li id= " home " class=" current ">
29. Beautiful HTML = Separate presentation from the content the content the content
39. Use <!--comment --> to create separated code blocks to create separated code blocks
40. <!-- header --> <div id="header"> ... <div> <!-- end of header --> <!-- main --> <div id="main"> ... <div> <!-- end of main -->
43. <div id="left"> <ul id="nav"> <li> <ul> <li> ... </li> <li> ... </li> </ul> </li> <li>...</li> </ul> <div> rather than
44. Conclusion There’s no rule, just recommendations Always use the best methods and best practices Say goodbye to bad coding habits Build more websites Code validator is your best friend