HTML5 and CSS3, Second Edition

(singke) #1

Figure 10—Our table looks great in Internet Explorer.


Although this will require the user to have JavaScript turned on, the table
styling is there mainly to make the content easier to see. As we already dis-
cussed, lack of styling doesn’t prevent anyone from reading the invoice.

Styling elements is a whole lot easier with these advanced selectors, especially
if you’re not allowed to modify the HTML you’re targeting due to a framework,
packaged product, or office politics. When you’re styling interfaces, use the
semantic hierarchy and these new selectors before you introduce additional
markup. You will find your code much easier to maintain.

We can also use CSS to add content to a web page. Let’s see how.


report erratum • discuss

Styling Tables with Pseudoclasses • 77


Download from Wow! eBook <www.wowebook.com>

Free download pdf