Lesson 5 Cascading Style Sheets (CSS)
Lesson 5 Cascading Style Sheets (CSS)
5.1 Introduction
CSS is the language we use to style a Web page.
What is CSS?
• CSS stands for Cascading Style Sheets.
• CSS describes how HTML elements are to be displayed on screen, paper, or in other
media.
• CSS saves a lot of work. It can control the layout of multiple web pages all at once.
• External stylesheets are stored in CSS files(.css)
Why Use CSS?
CSS is used to define styles for your web pages, including the design, layout and variations in
display for different devices and screen sizes.
Example of a webpage:
a) With no style
b) With style
When there is more than one style specified for an HTML element, inline style has the highest priority,
and will override external and internal styles and browser defaults.
h1 {
color: navy;
margin-left: 20px;
}
• ridge - Defines a 3D ridged border. The effect depends on the border-color value
• inset - Defines a 3D inset border. The effect depends on the border-color value
• outset - Defines a 3D outset border. The effect depends on the border-color value
• none - Defines no border.
• hidden - Defines a hidden border.