Home Lectures > CSS


Cascading Style Sheets
for Style
Mr. Chris Ong

What is CSS?

  • CSS: Cascading Style Sheets
    • A style sheet language used to describe the presentation semantics (look and formatting) of a document written in a markup language.
    • Enables the separation of document content from presentation, including elements such as the layout, colours and fonts.
    • Useful when you have layouts for more than one medium

How to use CSS


    CSS internal

    CSS external

    CSS code


    CSS Syntax

Common CSS rules

  • Fonts & Text
    • font-style, line-height, text-align, font-weight, letter-spacing, font-family, word-spacing, color, text-decoration

  • Backgrounds
    • Background-repeat, background-color, background-position, background-attachment, background-image

  • Images
    • border-style, border-color, border-width

CSS Pseudo Classes

  • Useful for links

  • Usually suffixed to selectors for anchor tags
    • a:visited, a:active, a:focused
      • a:visited{color:#000000;}
        • links that have been visited are now black in colour.

 

 

Back to top

Back to Lectures Index.