How To Change Header Color HTML?

Open the HTML file. You can use the inline style attributes to change the style of a single page element. This can be useful if you need to make one or two style changes, but is not recommended for widespread use. To completely change the style, use the previous method.

Find the element you want to change. You can use the inline style attributes to change the text color of any page element. For example, to change the text color of a particular header, locate it in the file:

<!DOCTYPE html>
<html>
<body>

<h1>This title needs to be changed</h1>

</body>
</html>

Add a style attribute to the element. Inside the opening tag of the element to be modified, enter style=””:

<!DOCTYPE html>
<html>
<body>

<h1 style="">This title needs to be changed</h1>

</body>
</html>

Inside the “”, enter color:. For example:

<!DOCTYPE html>
<html>
<body>

<h1 style="color:">This title needs to be changed</h1>

</body>
</html>

Enter the color of the text. You can do this in three ways: enter a name, enter a hex value, or enter an RGB value. For example, to make the text yellow, enter yellow;, rgb(255,255,0); or #FFFF00;:

<!DOCTYPE html>
<html>
<body>

<h1 style="color:#FFFF00;">This header turned yellow</h1>

</body>
</html>

A list of supported colors and their hex values can be found at http://www.w3schools.com/colors/colors_names.asp

Recommended Articles