Guide to HTML, CSS and JavsScript (University at Buffalo 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:

<!doctype html>

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:

-ms-radial-gradient
or
-moz-border-radius

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:

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.

Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Copyright © 2017 Jim Gerland