Prev | Current Page 119 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"

Sed aliquet
?? elementum erat. Integer diam mi, venenatis non, cursus a,
?? hendrerit at, mi.



Quisque faucibus lorem eget sapien. In urna sem, vehicula ut, mattis
?? et, venenatis at, velit. Ut sodales lacus sed eros.
The likelihood of this displaying consistently across browsers and platforms is low. More
important, the tags used don??™t relate to the content. Therefore, if the styling is removed,
there??™s no indication regarding what role each element plays within the document structure
and hierarchy??”for instance, there would be no visual clues as to the importance of
the heading. Also, the use of double line breaks (

) instead of paragraph tags
means the ???paragraphs??? cannot be styled in CSS, because there??™s nothing to inform the
web browser what the content actually is.
Instead, the example should be marked up like this:

Article heading


Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed
?? aliquet elementum erat. Integer diam mi, venenatis non, cursus
?? a, hendrerit at, mi.


Quisque faucibus lorem eget sapien. In urna sem, vehicula ut,
?? mattis et, venenatis at, velit. Ut sodales lacus sed eros.


Here, the heading is marked up with the relevant tags, and paragraph elements are used
instead of double line breaks. This means the page??™s structural integrity is ensured, and the
markup is logical and semantic. If attached CSS styles are removed, the default formatting
still makes obvious to the end user the importance of the headings, and will visually display
them as such.


Pages:
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131