WP Inter-1
WP Inter-1
2] <!--Demonstrate the use of CSS Selector implement CSS using ID, Class
and tag selector-->
<!DOCTYPE html>
<html>
<head>
<title>CSS Selector Example</title>
<style>
/* ID Selector */
#heading {
color: blue;
font-size: 24px;
}
/* Class Selector */
.highlight {
background-color: yellow;
}
/* Tag Selector */
p{
font-family: Arial, sans-serif;
}
</style>
</head>
<body>
<h1 id="heading">This is a Heading with ID Selector</h1>
<p class="highlight">This is a paragraph with Class Selector that adds a
background color.</p>
<p>This is a regular paragraph with no additional styles applied.</p>
</body>
</html>
li {
margin: 0;
padding: 0;
}
a{
text-decoration: none;
color: #333;
}
/* Horizontal Menu */
#horizontal-menu {
display: flex;
justify-content: center;
}
#horizontal-menu li {
margin: 0 10px;
}
/* Vertical Menu */
#vertical-menu {
width: 200px;
}
#vertical-menu li {
padding: 10px;
}
</style>
</head>
<body>
<h1>CSS Menu Design</h1>
<section id="services">
<h2>Our Services</h2>
<ul>
<li>Web Design</li>
<li>Graphic Design</li>
<li>Digital Marketing</li>
</ul>
</section>
</main>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<br><br>
<label>Gender:</label>
<input type="radio" id="male" name="gender" value="male" required>
<label for="male">Male</label>
<input type="radio" id="female" name="gender" value="female"
required>
<label for="female">Female</label>
<input type="radio" id="other" name="gender" value="other" required>
<label for="other">Other</label>
<br><br>
<label>Interests:</label>
<input type="checkbox" id="coding" name="interests" value="coding">
<label for="coding">Coding</label>
<input type="checkbox" id="reading" name="interests" value="reading">
<label for="reading">Reading</label>
<input type="checkbox" id="music" name="interests" value="music">
<label for="music">Music</label>
<br><br>
<label for="country">Country:</label>
<select id="country" name="country" required>
<option value="">Select</option>
<option value="us">United States</option>
<option value="ind">India</option>
<option value="uk">United Kingdom</option>
</select>
<br><br>
<label for="comments">Comments:</label>
<textarea id="comments" name="comments" rows="4" cols="50"
required></textarea>
<br><br>
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"
></script>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></sc
ript>
</body>
</html>
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"
></script>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></sc
ript>
</body>
</html>