You are on page 1of 26

HTML CHECKLIST

T
Do we need to add design in HTML
page?
Lesson 5:

INTRODUCTION TO CSS

ICT 2 | Web Development


I
OBJECTIVES
• Explain the concept of CSS
• Distinguish how to write CSS rules; and
• Apply CSS rules to HTML pages
CSS
Cascading Style Sheet
CSS
is a computer language for
laying out and structuring web
pages.
HTML FILE
HTML WITH CSS
< style >
to indicate that the styles are specified in CSS
HTML FILE
CSS ASSOCIATES STYLE RULES
selector

p{
font-family: Arial;
}
declaration
SELECTOR
indicate which element the
rule applies to.

DECLARATION
indicate how the elements referred to
in the selector should be styled
HTML WITH CSS
INTERNAL CSS
EXTERNAL CSS
HTML CSS File
File
EXTERNAL CSS
EXTERNAL CSS

< link >


can be used in an HTML document to tell the browser
where to find the CSS file used to style the page.
EXTERNAL CSS

href This specifies the path to the CSS file

This attribute specifies the type of


type document being linked to

This specifies the relationship between


rel the HTML page and the file it is linked
to
EXTERNAL CSS

< link href type rel >


EXTERNAL CSS
HTML CSS File
File
CSS SELECTORS
HTML
File
CSS File
Applies to all elements in
Universa
the document
l
Typ Matches element names
e
I Matches the one specified
after the pound symbol
D
Descendan Matches an element that is a
t descendent of another
specified element
Why do we use an External Style
Sheets?

You might also like