Sunday 12 January 2014

selector Id

<!DOCTYPE html>
<! id tag: The id attribute should only be used in one tag on your HTML page,
so that whatever is in that one tag look different. Here's an example of what it looks like:-->
<html>
<head>
<style>
#para1
{
text-align:center;
color:red;
}
</style>
</head>

<body>
<h1 id=id="para1">Welcome</h1>
<p id="para1">Hello World!</p>
<p id="para1">This paragraph is not affected by the style.</p>
</body>
</html>

No comments:

Post a Comment