HTML Code for Red

Introduction to Red in HTML

In HTML, the color red can be defined using the hexadecimal color code #FF0000 or the color name 'red'. Red is a vibrant and attention-grabbing color that is commonly used in web design to highlight important elements or create a visually striking impact.

Using Hexadecimal Color Code

To specify the color red using the hexadecimal color code in HTML, you can use the following code:

Using Color Name

Alternatively, you can also use the color name 'red' to define the color in HTML, like so:

example code

<pre><code>&lt;div style="color: #FF0000;">Text in red using hexadecimal color code&lt;/div> &lt;div style="color: red;">Text in red using color name&lt;/div></code></pre>

Go from files to website in seconds.

Start a free trial for 7 days — no credit card required

Get Started for Free