Guide to HTML, CSS and JavsScript (Buffalo State College Version)
Chapter 5: Creating an HTML5/CSS Compliant Web Page
Since this is a course that emphasizes HTML5, it is important that your web pages are HTML5 compliant. Earlier I introduced the first line of every HTML5:
As mentioned, this line tells the browser to expect HTML5 code (as opposed to HTML or XHTML).
You can test whether your web page is HTML5 compliant by visiting W3C HTML Validator (http://validator.w3.org) and entering the URL of your website. This service is under development so you may receive some errors or warnings that don't appear to have anything wrong with your code. For example:
Character Encoding mismatch!
Not only should your HTML5 code be complaint but your CSS code should be too. You can test whether your CSS code is compliant by visiting W3C CSS Validator (http://jigsaw.w3.org/css-validator/). This service is also under development so you may receive some errors or warnings if you have CSS code that is browser specific, such as:
Task - Create an HTML5/CSS Compliant Web Page
For this task you will create a new web page just as you did in previous tasks. Copy your current CSS Special Effects task web page to a new *html5.html* web page. This new web page that utilizes your HTML5 and CSS should include the following:
- A correct DOCTYPE tag for HTML5
- Convert any of your tags that are not compliant
- Correct any of your CSS that is not valid
You can (and should) use the W3C HTML Validator to verify your HTML5 code and the W3C CSS Validator to verify your CSS styles.
This web page should also have a link back to your Home Page web page.
You should then add an
<a> (anchor) tag to your Home Page web page that opens your HTML5 web page.