Tuesday, March 14, 2017

Color text in HTML

Learn on how to change the text color in HTML using CSS from the page WikiHow: Change-Text-Color-in-HTML.

Now I can always change the color using the class that I've placed at the internal style sheet section:

<style>
.redtext {
    color: red;
}
</style>
.
.
.
<body>
<p class="redtext">
The text in this paragraph is red in color
</p>
</body>

Another method is to use inline style attributes. For example:
This text is red in color

Neat!

No comments:

Post a Comment