Cascaded Style Sheets: 1. What Is CSS?
Cascaded Style Sheets: 1. What Is CSS?
1. What is CSS?
CSS stands for Cascading Style Sheet, CSS describes how HTML elements are to
be displayed on screen, paper, or in other media.
HTML was NEVER intended to contain tags for formatting a web page, it was created
to describe the content of a web page.
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
like indexExternalCSS.html
<head>
<style>
body {
background-color: linen;
}
</style>
</head>
like indexInternalCSS.html
Inline style
4. Psedudo-classes.
Implementation: Run index2.html, the example uses a link to be colored when it’s active,
visited and unvisited.
selector::pseudo-element {
property:value;
}
Implementation: Run index2.html, the example uses a paragraph that colors the first line.
5. CSS3: (Please note this for student knowledge only, they are not
required with any coding in this point)
CSS3 is the latest standard for CSS, Some of the most important CSS3
modules are:
Implementation: Run css3.html, the example uses a paragraph that colors the first
line.