Write the content of a separate style.css file, using a “generic class selector”, so that the color of
the specified elements is green. The specified elements are:
1) The heading “Tell me you’re URL:”
2) The word “URL”
3) The table heading “CHOOSE”.
These elements are highlighted in Figure. You must also show how to relate the style.css file
from your XHTML document and write CSS for the following figure.
And sir please guide how i can send file to you because figure given in screen shot in question paper
In css class is used to create the general style for our html page and it can use in our html content wherever we required.
Class can be created in css file by using dot operator.
As per requirement in the question we need to specify the green color for heading,url and table header.
Step 1: Create a new file and save it as style .css
Step2: In that new file add the below content. I used class name as color
.color {
color: green;
}
Step 3: In the html file: Added the class color where ever it required
<html>
<head>
<link rel="stylesheet" type="text/css" href="path of the css file">
</head>
<body>
<h1 class="color">Tell me you’re URL:</h1>
<p>This paragraph willcontain <span class="color">url <span></p>
<table>
<tr>
<th><td>Sample</td>
<td class="color">Choose</td>
</tr>
</th>
<table>
</body>
</html>
Comments
Leave a comment