HTML CSS WT EXTERNAL
HTML CSS WT EXTERNAL
//inline
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Inline CSS Example</title>
</head>
<body style="background-color: lightyellow;">
<h1 style="color: red; text-align: center;">Welcome to Inline CSS Example</h1>
<p style="font-family: 'Courier New', Courier, monospace; font-size: 16px; color: blue;">
This is an example of using inline styles applied directly to HTML elements.
</p>
<p style="font-weight: bold; color: green;">Inline styles override any other styles for specific
elements.</p>
</body>
</html>
//external Css
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>External CSS Example</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Welcome to External CSS Example</h1>
<p>This is an example of using an external style sheet linked to the HTML document.</p>
</body>
</html>
body {
background-color: lightgray;
}
h1 {
color: darkblue;
text-align: center;
}
p{
font-family: Verdana, sans-serif;
font-size: 18px;
color: black;
}
<h2>Table of Images</h2>
<table border="3">
<tr>
<th>Rock</th>
<td>
<img src="./images/rock-paper-scissors-emoji-cartoon-006-512.webp" width="150"
alt="Image 1">
</td>
</tr>
<tr>
<th>Paper</th>
<td>
<img src="./images/rock-paper-scissors-emoji-cartoon-011-512.webp" width="150"
alt="Image 2">
</td>>
</tr>
<tr>
<th>Scissors</th>
<td>
<img src="./images/rock-paper-scissors-emoji-cartoon-014-512.webp" width="150"
alt="Image 2">
</td>>
</tr>
</table>
</body>
</html>
4)Design web pages using i)Lists ii) table( implement rowspan, colspan attributes )
//lists
<!DOCTYPE html>
<html lang="en">
<head>
<title>Lists Example</title>
</head>
<body>
<h2>Unordered List (Bullet Points)</h2>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3
</ul>
//tables
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Table Example with rowspan and colspan</title>
<style>
table {
width: 100%;
border-collapse: collapse;
}
th, td {
border: 1px solid black;
padding: 10px;
text-align: center;
}
th {
background-color: #f2f2f2;
}
</style>
</head>
<body>
</body>
</html>
<div class="form-container">
<h2>Registration Form</h2>
<form id="registrationForm">
<label for="fname">First Name:</label>
<input type="text" id="fname" name="fname">
<br><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email">
<br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password">
<br><br>
<button type="button">Register</button>