To comply with the W3C standards, you must follow these 4 rules:
<p><strong>This is proper nesting</strong></p> <p><strong>This is improper nesting</p></strong>
<element attribute="value">This is proper nesting</element>
<p> </p> <h1> </h1> <a> </a> <body> </body>
If you make a mistake in your HTML, you will not be alerted in any way by the text editor, browser, or anything else. In some cases the page, element, or content may still show up just fine, In other cases, it may not. If something is not working or displaying properly check:
There are 3rd party tools we can use to check for errors, but we’ll come back to this. Remember: it’s important to follow the rules and standards.
Comment tags are used to insert notes in the HTML source code. HTML comments are visible to anyone that views the page source code, but are not shown when the HTML document is rendered by a browser.
<!-- the text typed in between these delimeters will not show up -->
Use comments to put your name and/or date at the top of your files and leave notes to yourself and others within the HTML files.
How do I know what valid attributes are for elements? How do I do _______________ in HTML? Find yourself a good reference book or head over to Google. Just start your search with either HTML or CSS to help narrow the results down. Two sites that you will see often are w3schools.com and stackoverflow.com
Using code you find online is encouraged! Just be sure you: 1) understand what it does and 2) format it correctly and follow our rules.