Change the color of all elements with the class "colortext", to "red". - HTML CSS CSS

HTML CSS examples for CSS:Quiz

Description

Change the color of all elements with the class "colortext", to "red".

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
.colortext {<!--   w  w w . j  a  va 2  s .  com-->
    color: red;
}
</style>
</head>
<body>

<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
<p class="colortext">This is another paragraph.</p>
<p class="colortext">This is also a paragraph.</p>

</body>
</html>

Related Tutorials