Summary

 < Day Day Up > 



We've looked over two simple ways we can minimize our markup—by refraining from peppering elements with class attributes and instead using descendant selectors for styling, as well as assigning ids directly to preexisting block-level elements instead of wrapping them up in a <div>.

While using one of these methods may seem like an insignificant savings, when you start to add these up over an entire website, the compact, structured code becomes evident and the savings become real. You'll be further on your way to authoring code that is leaner, more semantically sound, and easier to maintain in the future.

For extra credit, let's take a look at how descendant selectors can be taken to the next level in styling nested lists that will make up a site map.



 < Day Day Up > 



Web Standards Solutions. The Markup and Style Handbook
Web Standards Solutions: The Markup and Style Handbook (Pioneering Series)
ISBN: 1590593812
EAN: 2147483647
Year: 2003
Pages: 119
Authors: Dan Cederholm

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net