HTML and CSS Reference
In-Depth Information
Where Do Styles Come From?
Before any document-specific styles are applied to your pages, browsers
apply certain styles based on a combination of browser defaults, applica-
tion preferences, and advanced user customization.
Browser Style Sheets
Every browser ships with a default or base style sheet. From browser to
browser, these settings are common—headings are larger than the base
font size, links are underlined, lists have bullets, and some space appears
between individual paragraphs.
Browser vendors pick the styling based on a mix of accepted practices and
what will work best on their specific operating system and device. These
base style sheets act as the foundation for displaying all web pages.
Often, as in the case of lists and bullets, you may choose to not write
your own CSS and just go with the defaults. Or, you may want to alter
just one or two of these properties and let the rest be, such as changing
the margin and padding for list items but leaving the bullet style for list
items alone.
If you are the curious type, you can find all eight files that make up the
default style sheet for Firefox 3 via the internal URL resource://gre/res/ .
Internet Explorer's base style sheet isn't as accessible, but Jon Neil has
tried to reverse engineer it, placing the results at http://www.iecss.com/ .
One look at either, and you're sure to be overwhelmed.
You can simply ignore many of these settings, but some such as margins
or padding make creating consistent presentations difficult. In Chapter 13,
I'll cover using a “reset” to zero out some of these base style rules to
provide an even starting point to code against.
 
 
 
Search WWH ::




Custom Search