Page 175 - Computer Software Application TP - Volume 1
P. 175
COMPUTER SOFTWARE APPLICATION - CITS
TASK 2: Using CSS Id Selector
1 Open the text editor
2 Write the following codes
<html>
<head>
<style>
#para1 {
text-align: center;
color: blue;
}
</style>
</head>
<body>
<p id=”para1”>Hello Javatpoint.com</p>
<p>This paragraph will not be affected.</p>
</body>
</html>
3 Save the program as a .html file
4 Open the html file with a web browser
5 Verify the output.
TASK 3: Using CSS Class Selector
1 Open the text editor
2 Write the following codes
<html>
<head>
<style>
.center {
text-align:right;
color: blue;
}
h1.center {
text-align: center;
color: red;
}
160
CITS : IT & ITES - Computer Software Application - Exercise 44