CSS/HTML Set Text Colors Code For Website - Learn About Website | DaddyFile

0

Text Color Explain

The color property is used to set the color of the text.
With CSS, a color is most often specified by:



Html Code:

<!DOCTYPE html>
<html>
<head>
<style>
body {
    color: blue;
}

h1 {
    color: green;
}
</style>
</head>
<body>

<h1>This is heading 1</h1>
<p>This is an ordinary paragraph. Notice that this text is blue. The default text color for a page is defined in the body selector.</p>

</body>
</html>






Html Code Result:

This is heading 1

This is an ordinary paragraph. Notice that this text is blue. The default text color for a page is defined in the body selector.

Post a Comment

 
Top