In HTML, we can change the color of any text using the following different ways:
Audacity 2.3.2 replaces all previous versions for Windows, macOS and Linux. Improvements: Audacity now includes the LAME mp3 encoder. Previously, due to now expired patents, you had to download it separately.There is a new 'Select' button in the track panel to select the whole track.Audacity. 29.10.12 DVBViewer Recording Service 1.6.5 Beta. UPnP/DLNA streaming of Videos, Music and Photos to the TV or other DLNA compatible devices is one of the main features of this new version of the DVBViewer Recording Service 1.6.5.
- Using HTML tag
- Using an Inline style attribute
- Using internal CSS
1. Using HTML tag
Note: HTML 5 does not support the color attribute of font, so we have to use the inline style attribute and internal CSS options for changing the color of a text.
If we want to change the color of a text using Html tag which is to be displayed on a web page, we have to follow the steps which are given below. Using these steps, we can easily change the color of any text:
Blueharvest 7 0 4 – disable ds_store creation and more. Step 1: Firstly, we have to type the Html code in any text editor or open the existing Html file in the text editor in which we want to use the Html tag.
Step 2: Now, move the cursor at the starting of that text whose color we want to change. And then, type the empty Html tag at that position.
Step 3: Then, we have to close the font tag at the end of the text whose color we want to change.
Step 4: Now, we have to add the attribute of the font tag whose name is 'color'. So, type the color attribute within the starting tag. And, then we have to give the color which we want to use on the text. So, type the name of color in the color attribute as described in the following block.
Step 5: And, at last, we have to save the Html code in the text editor and run the code. After execution, we will see the output in the browser. The following screenshot shows the output of the above Html Code:
Lighten Screenshot Editor 2 3 2018 Download
2. Using an Inline Style attribute
If we want to change the color of a text using an inline style attribute which is to be displayed on a web page, we have to follow the steps which are given below. Using these steps, we can easily change the color of text.
Step 1: Firstly, we have to type the Html code in any text editor or open the existing Html file in the text editor in which we want to use the style attribute for changing the color of a text.
Step 2: Now, move the cursor at the starting of that text whose color we want to change. And then, type the inline style attribute within any element. Here, we use the
(paragraph) tag:
Step 3: In this step, we have to give a name of color as a value. We can give the color name in three forms:
- We can type the name of a color
- We can also enter the RGB value of a color
- We can also enter the hexadecimal value of a color.
Step 4: Then, we have to close the element at the end of the text whose color we want to change.
Step 4: And, at last, save the Html code which changes the text color using the CSS style attribute.
The output of the above code is shown in the following screenshot:
2. Using Internal CSS
If we want to change the color of a text using an internal cascading stylesheet which is to be displayed on a web page, we have to follow the steps which are given below. Using these steps, we can easily change the color of text.
Step 1: Firstly, we have to type the Html code in any text editor or open the existing Html file in the text editor in which we want to use the internal CSS for changing the color of a text.
Step 2: Now, we have to place the cursor in the head tag of the Html document and then define the styles inside the </strong> tag as shown in the following block. And, then type the <strong>color</strong> attribute into the element selector.</p>
Step 3: In this step, we have to give a name of color as a value. We can give the color name in three forms:
- We can type the name of a color
- We can also enter the RGB value of a color
- We can also enter the hexadecimal value of a color.
Step 4: Then, we have to close the element at the end of the text whose color we want to change.
Step 4: And, at last, save the Html code which changes the text color using the CSS style attribute.
The output of the above code is shown in the following screenshot:
2. Using Internal CSS
If we want to change the color of a text using an internal cascading stylesheet which is to be displayed on a web page, we have to follow the steps which are given below. Using these steps, we can easily change the color of text.
Step 1: Firstly, we have to type the Html code in any text editor or open the existing Html file in the text editor in which we want to use the internal CSS for changing the color of a text.
Step 2: Now, we have to place the cursor in the head tag of the Html document and then define the styles inside the </strong> tag as shown in the following block. And, then type the <strong>color</strong> attribute into the element selector.</p><img src='https://photo.wondershare.com/images/en/photo-editor/photo-background-remover-movavi.jpg' alt='Lighten screenshot editor 2 3 2018 online' title='Lighten screenshot editor 2 3 2018 online'><div><textarea name='code'> <Head> <style> Body { color:orange; } p { color:green; }
Step 3: Now, we have to type the defined element selector before the text whose color we want to change.
The output of the above Html code is shown in the following screenshot: