EXERCISES
  1. Using CSS, enlist the approach to format display of an HTMP page to suit a number of devices like mobile displays and printer output, apart from normal web displays.
  2. Consider the following CSS definitions.
    1. p.myclass1 {color: red}
    2. p.myclass2 {color: blue}
    3. myclass3 {color: green}
    4. Represent them in equivalent HTML inline styles.
  3. Write a CSS rule to achieve the following:
    1. Set all headings (h1…h6) to Red font with all caps
    2. Set text color of all <p> elements to green
  4. Consider this malformed piece of XHTML document as shown below. DOM is the document object model, which is the way tagged elements are organized (in a hierarchical fashion). What will be the resulting DOM fragment?
     <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” ...

Get Web Technology: Theory and Practice now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.