Introducing CSS

Designing the XHTML Coding

Setting It All Up

Every element from an XHTML code that needs to have a specific look - color, design, layout - will use a CSS code similar to this. It will include elements from the XHTML code such as:

body
h1, h2...
p

These elements will then be represented with certain attributes in CSS

css elements

Common Properties

class - uses a period . to assign attributes to a specific element

id - uses a hashtag # to assign attributes to a specific element

css attributes

Revert to XHTML for comparison

Colors

There are two ways to assign colors to CSS properties:

#00FFCC - this relates to a very specific shade of color
white, blue... - this relates to the basic colors

css color coding