Colors for background and text in HTML page

To set the color of the text on the whole page we resorted to the text attribute of the tag body, which receives a value to determine the color of the text.

Colors for background and text in HTML page | Learn HTML | To set the color of the text on the whole page we resorted to the text attribute of the tag body, which receives a value to determine the color of the text

When setting up the text, there are many possibilities. We can change the font, the color, the size, etc.

Here we will see all the possibilities that affect the text of our page. The first thing we will see, by way of introduction, is how to set the color of the text on the entire page. For this, we resort to another attribute of the tag. It is the text attribute, which receives a value to determine the color of the text on the entire page. The color is indicated as in the case of bgcolor, either by its name in English or by its hexadecimal specification. Let's see an example, called colors_1.html

<html>
                <head>
                <title> Colores </title>
                </head>
                <body bgcolor=”#66CC99” text=”#0000FF”>
                               Blue text on green background
                </body>
</html>

Colors for background and text in HTML page

This would give result what you see in the previous figure. All the text that you put on the page will appear, by default, in blue color at runtime. Observe in the list that we have used safe colors for the web, to make sure that the page is viewed correctly on any platform and browser.

In addition to the general color of the text, there are many possibilities that it offers us. Let's see them.

🤖

ChatGPT Free
Ask questions on any topic

CITE ARTICLE


For homework, research, thesis, books, magazines, blogs or academic articles

APA Format Reference:

Delgado, Hugo. (2019).
Colors for background and text in HTML page.
Retrieved Dec 10, 2024, from
https://disenowebakus.net/en/colors-background-text-html

Participates!

Share it with your friends in Social Networks!

Professor at the University of Guadalajara

Hugo Delgado Desarrollador y Diseñador Web en Puerto Vallarta

Professional in Web Development and SEO Positioning for more than 10 continuous years.
We have more than 200 certificates and recognitions in the Academic and Professional trajectory, including diploma certificates certified by Google.

CONTINUE LEARNING

IT ALSO DESERVES TO PAY TO VISIT:

Not finding what you need?

Use our internal search to discover more information
Related content:

Would you like to learn more about Web Design?

Meet all the courses and tutorials that we have for you completely free
Learn Web Design
 

Leave your Comment

SPONSOR

Your business can also appear here. More information

Your browser has blocked advertising.
Please 🙏 Allows you to view the ads to access, thank you.