Introduction To CSS - 060312
Introduction To CSS - 060312
to CSS
Introduction
• CSS is a style sheet language used to
describe the presentation of a document
written in a mark up language.
• A style sheet is an addition to HTML that
allows you to separate display properties
from structure.
• CSS describes the appearance, layout, and
presentation of information on a web page.
© K.S. Mbise
}
CSS Slide 8
Syntax of CSS cont…
• If there is more than one property,
each property should be separated
with a semi-colon (;)
• E.g. p {
text-align: center;
color: maroon;
}
© K.S. Mbise CSS Slide 9
CSS comments
• Comments are used to explain the
code, and may help when you want to
edit the source code at a later date.
• Comments are ignored by browsers.
• A CSS comment starts with /* and
ends with */.
• Comments can also span multiple
lines:
© K.S. Mbise CSS Slide 10
CSS Comments cont…
p{
color: red;
/* This is a multiple-line
comment */
text-align: center;
}