How to Change Text Color in HTML

preview_player
Показать описание
This tutorial will teach you the ways of changing text color in HTML. There are two basic ways of changing text in HTML.

In this tutorial we will teach you the ways of changing text color in HTML. Changing color of the text in HTML can be done in many ways. One way is to set s universal color for the whole text and the other way is to use a color for a specific attribute. Overall, there are 16 million colors of HTML with their 6-digit hex codes which are easily available on the internet.

Step 1: Set Universal Color of the Text in HTML

In html, to change text color you can set the universal color. Setting universal color means to set a color for all attributes of text like heading, paragraph etc in the body element. To set the color, you can use any of the 6-digit code for the color value or simply write the name of the color, for example orange or any other, along with the text. This will change all the text on a web page to orange. Similarly, by setting the text attribute to blue, the text color of the web page changes to blue..

Step 2: Change Text color of a paragraph in HTML

If we don't want to change the color of the complete text on the webpage, we can use the "font" element for changing text color in html. We have to first set the color value inside the font element. The color value can be set by any of the 6-digit Hex code or writing only the color name. The text has to be placed within the font element. Over here, let's set the color to green and once your refresh the page, you can see that html changes the text color.

Step 3: Change Line's Text color in HTML

In order to change the color of a single line, we enclose the text within the text color attribute and set the color to the desired color. This change is specific to a piece of text and overrules any text color set at the universal level or to the paragraph containing the line.
Рекомендации по теме
Комментарии
Автор

❗ Subscribe To Our Main YouTube Channel

howtechweb
Автор

This was very helpful cuz my teacher didn't even tell us how to separately color text and now he asked us to do it

Orion-obny
Автор

11 years and we still using this, thank you

Jesterpain.
Автор

Aye I got my first assignment in html code and I actually want to surprise my teacher with changing the text color, so he will see that I'm motivated for this education.

Also I always thought I hated HTML code but it's actually really fun to do(:

roroqkawaii
Автор

Thumb's-up clicked! Short, quick and immediately to the point. I'm an ameteur dependent on tutorials and I'm so glad I didn't have to go digging in CSS code to do this, thanks!

JohnMartens
Автор

HTML programming is easy! Thanks to your tutorial bro. :)

cameronm
Автор

can anyone explain me why he has two </font> (s) ?

datobachilava
Автор

how to change color of a particular text inside a paragraph without changing the color of the whole paragraph?

lindsaycantillan
Автор

Tell us how to make a specific word a specific color in the same paragraph...

gorblah
Автор

I used this code -
<p style="colour: blue;"/>
Why doesn't it work ??

Startdust_Daydream
Автор

At 1:14 why is there two back-to-back </font> ?

RonstoOSRS
Автор

Thank you this helped me code with stye

Arandom
Автор

*BUMP*
Adrian Snipes
1 month ago
At 1:14 why is there two back-to-back </font> ?

Kendo
thanks, that's all i want & all i need to know, (apart from is a cut/copy or paste link) and a new caps lock button for my laptop, thank's for your comment that helped the (me) trolling all over the internet watching video's with 'no links's, in the description !! @Internet Services and Social Networks Tutorials from HowTech

kendo
Автор

yo how do i do it when i have a body color dude need answers man,

sumoymaity
Автор

<p font color:red>test</p>

njj
Автор

<p font color:black>What application do I need to download to edit?</p>

Galantis_garantisu