Introduction to CSS
Introduction to CSS
Objectives
▪ Syntax:
<h1 style=
“background-color:red”>Hello</h1>
Inline Stylesheets
Internal CSS
An internal CSS is defined in the <head> section of an HTML page, within a <style> element.
External CSS
▪ An external style sheet is used to define the style of many HTML pages.
▪ To use an external style sheet, add a link to it in the <head> section of each HTML page.
Background Image
▪ Syntax:
<style>
body{
background-image:url("BG.png");
}
</style>
CSS Colour Properties
Syntax:
Inline stylesheets
CSS Colour Properties
▪ External Stylesheets: A separate file with.css extension is designed with all the basic styling components
and it is linked with the .html file.
Syntax:
abc.css-containing all the styling as shown:
CSS Box Model