HTML with CSS using the class attribute:-
<html>
<head>
<style>
p.cad {
color: brown;
}
</style>
</head>
<body>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p class="cad">I am changer.</p>
<p>This is a paragraph.</p>
<p class="cad">I am changer 2nd.</p>
</body>
</html>
OUTPUT:-
<html>
<head>
<style>
p.cad {
color: brown;
}
</style>
</head>
<body>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p class="cad">I am changer.</p>
<p>This is a paragraph.</p>
<p class="cad">I am changer 2nd.</p>
</body>
</html>
OUTPUT:-
No comments:
Post a Comment