CSS code not work

A

Anonymous

Guest
hello,

the color that you have mentioned for paragraph it just enclosed with id first <p> tag and not implemented on another text within <p> tag. so use this way as below:

<html>
<head>
<style type="text/css">
#top{
color:green;
}
</style>
</head>
<body>
<p id="top">
my color is here
</p>
</body>
</html>
 
You can also use this code instead for declaring id in a <p></p> tag.Simply set the color of p is green.

p{ color:green; }
 
Back
Top