Prev | Current Page 152 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"


Note that the preceding CSS style has a capital letter halfway through it??”this case is
known as lowerCamelCase, and is a method of writing multiple-word style names,
because underscores and spaces must be avoided in CSS. Take care if you do this,
because styles are case sensitive. If you set a class attribute value to warningtext
instead of warningText, many browsers fail to display the style, reverting to the
default style for the relevant element.
THE ESSENTIAL GUIDE TO CSS AND HTML WEB DESIGN
88
Styling semantic markup
The exercises in this section will combine the elements discussed so far in this chapter,
showing how to use the knowledge gained to style some semantic markup. Three different
examples are on offer, showing how rapidly you can create great-looking text when working
with CSS, and also how you can easily restyle a page of text without touching the
markup. The markup that you??™ll use is as per that in the next code block; and the default
web page, without any CSS applied, is shown to its right.

Article heading


Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Sed
?? aliquet elementum erat. Integer
?? diam mi, venenatis non, cursus
?? a, hendrerit at, mi. Morbi risus
?? mi, tincidunt ornare, tempus
?? ut, eleifend nec, risus.


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


Pages:
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164