Web Guide  > webguide > 6. Construction > 6.3 Use of style sheets

6.3 Use of style sheets

Guideline

What is CSS?

Cascading Style Sheets (CSS) describe how documents are presented on screen or in print. When combined with structural markup language such as HTML, XHTML, or XML, the CSS provides Internet browsers with the information that enables them to present all the  visual aspects and elements of a Web document.
Thus, by using CSS, it is possible to separate out document presentation from document content.

 

An example of CSS code:

CSS code

 

Styling

The presentational effects that can be applied using CSS includes the layout of all the page elements such as the banner, the menus and the content. Also, the formatting of all content such as font type, font size, spacing between paragraphs, positioning of images, background colours etc.
The HTML, XHTML, or XML controls the structure of the Web page, which means determining that certain text is a heading, other text is a paragraph, certain words are a list of hyperlinks, etc.

CSS summary

  • CSS stands for Cascading Style Sheets
  • Styles are stored in an external Style Sheet (or CSS file)
  • Styles define how HTML elements are displayed
  • CSS enable you to change the appearance and layout of all the pages in your Web site by editing a single CSS file
  • Multiple CSS can be referenced inside a single HTML document

XSLT

Extensible Style sheet Language Transformations (XSLT) is a language for transforming XML. An XSLT style sheet specifies the presentation of a class of XML documents by describing how an instance of the class is transformed into an XML document that uses a formatting vocabulary, such as (X)HTML or XSL-FO.