---
title: Font Color Attribute
localeTitle: Atributo de color de fuente
---
## Atributo de color de fuente

Este atributo se utiliza para establecer un color en el texto incluido en una etiqueta de `<font>` .

### Sintaxis:

\`\` html \`\` \`

### Importante:

Este atributo no es compatible con HTML5. En su lugar, este [artículo de freeCodeCamp](https://guide.freecodecamp.org/css/colors) especifica un método CSS, que puede usarse.

### Nota:

También se puede especificar un color utilizando un 'código hexadecimal' o un 'código rgb', en lugar de usar un nombre.

### Ejemplo:

1.  Atributo de nombre de color

```html

<html> 
  <body> 
   <font color="green">Font color example using color attribute</font> 
 </body> 
 </html> 
```

2.  Atributo de código hexadecimal

```html

<html> 
  <body> 
   <font color="#00FF00">Font color example using color attribute</font> 
  </body> 
 </html> 
```

3.  Atributo RGB

```html

<html> 
  <body> 
    <font color="rgb(0,255,0)">Font color example using color attribute</font> 
  </body> 
 </html> 

```