Cascading style sheets (CSS) make webpages look presentable and provide a framework for structuring content. XML and HTML are hierarchical, so CSS makes it look attractive. CSS allows the content to be separate from the presentation. This is important when considering accessibility, for example, someone who has a visual impairment may use a screen reader (see guidance by the RNIB).
A website with good examples of CSS is CSS Zen Garden. If you look at my website you'll see that I've applied a different style sheet to the main page from the html exercise and Epping Forest pages. In reality, it's better to be consistent throughout, particularly to gain brand recognition.
A style sheet determines the formatting of, for example, headers, paragraphs and fonts. This is what CSS markups look like. Note that you need to use American spelling such as color.
You can check if your CSS is valid with the W3C CSS validation service.
Advocates of CSS (for example, Eric Meyer) claim that websites with style sheets load up more quickly than those using tables; are easier to maintain and redesign; are more accessible and that search engines are more likely to find websites with CSS. Critics say CSS-based websites are unstable and do not work for all internet browers. This article from Smashing Magazine looks at websites with table layouts and how web developers are now using the div tag in the same way.


No comments:
Post a Comment