Skip to content

LLC: Webmaking with HTML and CSS

Jonathan edited this page Jun 16, 2023 · 19 revisions

Information

Current versions

Links

  • Slides:
  • Learner reference:
  • Development environment & starter project:

Extras

Learner resources

HTML reference

CSS reference

Properties

Colours

Named colours

  • Some colours can be specified by name, e.g., background-color: red;

  • Note that the color name is not enclosed in quotes, i.e., it is red and not 'red'.

  • Select named colours, some of which are used in the starter project, include:

    • darkslategray
    • gold
    • goldenrod
    • hotpink
    • lightcyan
    • lightgray
    • lightgreen
    • mediumvioletred
    • skyblue
    • white
    • whitesmoke
    • yellowgreen
  • A full list of named colours can be found in the MDN Web Docs References - <named-color> (External link)

Hexadecimal

RGB

MDN Web Docs References - rgb()

  • Colours can be specified using an expression,rgb( R, G, B) where each of R, G, and B refer to the amount of red, green, and blue present in a colour.
  • R, G, and B can be written in one of three ways:
    1. as a number, between 0% and 255. e.g. rgb(31 120 50) (dark green)
    2. as a percentage, between 0 and 100%, e.g. rgb(30% 20% 50%) (purple)
    3. using the keyword none
  • All of the values must be of the same type (i.e., all numbers or all percentages) or none

Clone this wiki locally