0% found this document useful (0 votes)
24 views4 pages

Assignment 14 Iwt

The document contains 4 assignments involving the use of CSS to style HTML elements: 1. Add a style sheet to an HTML file that displays h1 elements in blue and links in blue without underlining, changing the background to yellow on hover. 2. Customize input field background and font colors inside an HTML file using inline styles. 3. Add an external style sheet to a website homepage specifying body, class, and ID styles. 4. Use a CSS file to style a table with a red border that is 1px solid, with the top border being 3px and black in color.

Uploaded by

Nancy Kumari
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)
24 views4 pages

Assignment 14 Iwt

The document contains 4 assignments involving the use of CSS to style HTML elements: 1. Add a style sheet to an HTML file that displays h1 elements in blue and links in blue without underlining, changing the background to yellow on hover. 2. Customize input field background and font colors inside an HTML file using inline styles. 3. Add an external style sheet to a website homepage specifying body, class, and ID styles. 4. Use a CSS file to style a table with a red border that is 1px solid, with the top border being 3px and black in color.

Uploaded by

Nancy Kumari
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/ 4

ASSIGNMENT- 14

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

the link’s background colour to yellow.

<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

inside the html file.

<html>
<head>
<title>Document</title>
</head>
<body>
Enter Text Here<input type="text" style="background-color: chartreuse;
color: brown;">
</body>
</html>

OUTPUT-

3. Add an external style sheet to your 6th-semester-course management Web site by

adding at least the following rules:

a. Background colour, margins, font family, font size

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

is 3px and border-top-colour is black.


<html>
<head>
<title>
Assignment14
</title>
<link rel="stylesheet" href="style3.css">
</head>
<body>

<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-

You might also like