XML - Managing Data Exchange/XHTML/Exercises

XHTML Chapter => XHTML

XHTML Answers => Answers

Exercise 1
Below is an example of an invalid HTML document that contains a number of deprecated features. It is also badly structured. The document needs converting to XHTML with the content separated from the presentation.

a. Change the HTML document into a valid XHTML 1.0 Transitional document. Validate your page using the validator available at http://validator.w3.org/.

b. Starting with the model answer for question 1.a. indentify all deprecated elements and attributes in the document and replace them with CSS in a linked external stylesheet. See HyperText Markup Language/Tag List for details of deprecated elements.

c. Starting with the model answer for question 1.b. replace all presentational markup with semantic markup and ensure that all inline elements are contained in block-level elements. Change the DOCTYPE to XHTML 1.0 Strict and validate the page with the W3C Markup Validation Service.

 Convert HTML to XHTML XHTML page  It is important for your site to be current with the most recent W3C standards.  Welcome to my page. I hope that you enjoy your stay.  XHTML is similar to HTML  Validator 

Exercise 2
Create a simple HTML document and purposely nest tags incorrectly or don't close a few tags, then run the document through the W3C's online HTML Tidy service.

XHTML Chapter => XHTML

XHTML Answers => Answers