Hello Guys,
In our previous chapter we studied about inline CSS in HTML. We use CSS in 3 ways in any HTML document. : -
<html>
<head>
<style>
body
{
background-color:blue;
}
h1
{
color:red;
text-align:center;
}
p
{
font-family:"Times New Roman";
font-size:20px;
}
</style>
</head>
<body>
<h1>INTERNAL CSS example!</h1>
<p>This is a paragraph.</p>
</body>
</html>
In CSS we use STYLE attribute to give style in an HTML document.
In our previous chapter we studied about inline CSS in HTML. We use CSS in 3 ways in any HTML document. : -
- INLINE CSS
- INTERNAL CSS
- EXTERNAL CSS
<head>
<style>
body
{
background-color:blue;
}
h1
{
color:red;
text-align:center;
}
p
{
font-family:"Times New Roman";
font-size:20px;
}
</style>
</head>
<body>
<h1>INTERNAL CSS example!</h1>
<p>This is a paragraph.</p>
</body>
</html>
In CSS we use STYLE attribute to give style in an HTML document.
Post a Comment