Assignment 14 Iwt
Assignment 14 Iwt
1. Add an embedded style sheet to the HTML document. The style sheet should contain
a rule that displays h1 elements in blue. In addition, create a rule that displays all
links in blue without underlining them. When the mouse hovers over a link, change
<html>
<head>
<title>Document</title>
</head>
<link rel="stylesheet" href="style.css">
<body>
<h1>Name</h1>
<a href="https://www.soa.ac.in/" target="_blank">Click here to open SOA
Website</a>
</body>
</html>
CSS
h1{
color: blueviolet;
}a:link{
text-decoration: none;
color: red;
}
a:hover{
background-color: yellow;
}
a:visited{
color:blue;
}
OUTPUT-
2. The background colour and the font colour of inputs are customized by a separate
CSS file. Instead of a separate style sheet how these colours styles can be mention
<html>
<head>
<title>Document</title>
</head>
<body>
Enter Text Here<input type="text" style="background-color: chartreuse;
color: brown;">
</body>
</html>
OUTPUT-
b. One Class
c. One ID
Remember to create your style sheet and then attach it to your page in the html
headertag.
<html>
<head>
<title>Document</title>
<link rel="stylesheet" href="style2.css">
</head>
<body>
<h1>SUBJECT DETAILS OF 3RD SEMESTER</h1>
p
</body>
</html>
CSS
h1{
text-align: center;
}
body{
background-image: url(https://images.squarespace-
cdn.com/content/v1/57713a8e2994cae381dd86fe/1655729453895-
BJ96ANKG3W7H9RYLY44C/ITER+1.jpg);
background-size: cover;
OUTPUT-
4. Using CSS file Create a Table tag where table border is 1px solid red; border-top-width
<table>
<th>Hello</th>
<td>MCA</td>
<td>BCA</td>
</table>
</body>
</html>
CSS
body{
border: 1px solid red;
border-top-width: 3px ;
border-top-color: black;
}
OUTPUT-