0% found this document useful (0 votes)
15 views

prog3web

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

prog3web

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

3. Develop an external style sheet named as “style.

css” and provide


different styles for h2, h3, hr, p, div, span, time, img & a tags. Apply different
CSS selectors for tags and demonstrate the significance of each.

<!DOCTYPE html>

<head>
<title>Styled HTML Page | vtucode</title>
<link rel="stylesheet" href="style.css">
</head>

<body>

<h2>Main Heading</h2>
<h3>Subheading</h3>
<hr>
<p>This is a paragraph demonstrating the basic text styling applied by
CSS.</p>

<div>
This is a styled <strong>div</strong> element with padding and a
light border. Inside the div, we can also use
<span>span elements</span> that have their own styles, like this
bold and orange text.
</div>

<p>Current time: <time>10:30 AM</time></p>


<img src="https://vtucode.in/wp-content/uploads/2024/08/Web-
Technology-Lab.jpg" alt="Placeholder Image">

<p>Visit <a href="https://vtucode.in">vtucode.in</a> to learn more


about our services.</p>

<p class="highlight">This paragraph is highlighted with a yellow


background.</p>
<p class="center">This text is centered using a class selector.</p>

<p id="special-paragraph">This is a special paragraph with unique


styles applied through an ID selector.</p>

</body>

</html>

You might also like