How to choose the color of the words?


how to choose the color of the words
Repl link:

code snippet

In future, please link your repl and be more clear about what you want.
First of all, a HTML file, for compatibility and accessibility, should always have this boilerplate at the start:

<!DOCTYPE html>
<meta charset=utf-8>
<meta name=viewport content="width=device-width">
<title>the night is over</title>
<html lang=en>

Use CSS.


Hey @edu4rdo2008! Welcome to the community!

You can use CSS to change the text of your webpage. Here’s is a step by step guide on how you can do so:

  1. Create a CSS file in the same folder as your HTML file. I have decided to name it style.css.

  2. Copy this code below

.colored {
    color: red;

The .colored represents a CSS class that you can use on HTML elements.
color: red means to set the color of main component of your element to red.

  1. Link the CSS file to your HTML file. It’s recommended to do it in the <head>.
    <!-- … -->
    <link rel="stylesheet" href="style.css">

The rel attribute tells the computer what you are linking and the href tells where the source file is.

  1. Add an element with the .colored class in your <body> element, preferably using the <p> element to see the effects easily.
    <p class="colored">I am RED???</p>

You should be able to see the red text in your website.

A more in-depth guide on CSS has been posted by @UMARismyname. You can check it out if you want.

Hope this helps!



So assuming you want to choose a good color theme, what programming language are you refering to? Or do you want to find a color theme in general?

In other words can you be more specific?

1 Like

Use css!

  • click “+”
  • type style.css
  • press enter
  • add a class to your element in the index.html file, example:

    My Paragraph!

  • in the style.css file type
.any-name {

I hope you find this helpful, any questions? Comment on this repl:

Shouldn’t that go in the head?

<!DOCTYPE html>
<html lang="en">

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width">

    <h1>Hello, world!</h1>


You don’t need head and body tags as long as you put the head stuff before the content of the document.

1 Like

Okay, but head and body makes HTML so much more readable.

1 Like