What CSS
means.?
CSS is an acronym for Cascading Style Sheets.
Styles are used to define HTML elements. Styles were added to HTML 4.0 and can solve a variety of problems.External
Style Sheets are stored in CSS
files and can make our work easier.
SAMPLE CODE:
<!DOCTYPE html>
<html>
<head>
<style>
body
{
background-color:green;
}
h1
{
color:white;
text-align:center;
}
p
{
font-family:"Times New Roman";
font-size:20px;
}
</style>
</head>
<body>
<h1>infotuck!</h1>
<p>This is a paragraph.</p>
</body>
</html>
<html>
<head>
<style>
body
{
background-color:green;
}
h1
{
color:white;
text-align:center;
}
p
{
font-family:"Times New Roman";
font-size:20px;
}
</style>
</head>
<body>
<h1>infotuck!</h1>
<p>This is a paragraph.</p>
</body>
</html>
In this
initially the background color is set to green. This can be varied accordingly
to our needs by changing the name of color corresponding to background-color:.
Now heading
is set along with the color of the font. In above stated example the color is
set to white and can also be changed accordingly.
No comments:
Post a Comment