8. CSS, Frames, and More Tags in HTML
8. CSS, Frames, and More Tags in HTML
• Frames allow multiple web pages to be displayed inside a single browser window.
Example:
<frameset cols="50%,50%">
<frame src="page1.html">
<frame src="page2.html">
</frameset>
Example HTML Program:
Using CSS to Style a Web Page:
<!DOCTYPE html>
<html>
<head>
<style>
h1 { color: blue; text-align: center; }
p { font-size: 16px; color: green; }
</style>
</head>
<body>
<h1>Welcome to My Web Page</h1>
<p>This is a paragraph styled using CSS.</p>
</body>
</html>
Tasks:
Task 1: Write an HTML program that displays a heading and a paragraph using inline CSS.
Task 2: Modify your program to include internal CSS to change the background color and text color.
Task 3: Create a webpage that uses an iframe to display another website along with a styled paragraph.