Web L2 CSS
Web L2 CSS
Learning Objective
• Understand how CSS is used to set the styles in web
pages and websites
<h1 style="text-align:center">
HTML and Website Development
I Do L2 CSS
Embedded styles
• Style declarations are placed in the <head>
section of a web page, between new <style>
</style> tags
• To change the heading colour, for example:
<style>
h1 {color: blue;}
</style
HTML and Website Development
I Do L2 CSS
CSS Syntax
Selector Declaration
h1 {color: blue;}
Property Value
HTML and Website Development
I Do L2 CSS
<body>
<h1>
……………………………..
</h1>
• Everything that falls inside that tag or selector in
the html body adopts that style
HTML and Website Development
I Do L2 CSS
Content
Navbar
HTML and Website Development
I Do L2 CSS
Border
Padding
Content
HTML and Website Development
I Do L2 CSS
Responsive Design
• Websites are viewed on different size screens
• Webpages must automatically adjust to fit
• Set widths as percentages rather than pixels
HTML and Website Development
We Do L2 CSS
What makes
good web
design?
HTML and Website Development
We Do L2 CSS