Style Tags
Style Information of an HTML Document is defined by Style tags.
1. <style>
<style> tag defines style information for a document.
Example :
Example :
<!DOCTYPE html>
<html>
<head>
<title> Style </title>
<style>
h1 {color:blue;}
p {color:green;}
</style>
</head>
<body>
<h1>This is example of style</h1>
<p>This is a paragraph.</p>
</body>
</html>
2. <div>
<div> tag defines a section in a document.
Example :
Output :Example :
<html>
<body>
<h1>The div element</h1>
<div style="background-color:blue">
<h3>This is a example of div element</h3>
<p>This is some text in a div element.</p>
</div>
<p>This is some text in a p element.</p>
</body>
</html>
0 Comments