[ Voltar ] [ Índice ] [ Avançar ]


Alterando a cor do texto

Para alterar a cor do texto use a opção color dentro da tag <font>. A sintaxe é:

<font color = "COR">

onde COR pode ser especificada de acordo com a tabela abaixo

 
black
#000000
maroon
#800000
green
#008000
olive
#808000
navy
#000080
purple
#800080
teal
#008080
gray
#808080
silver
#C0C0C0
red
#FF0000
lime
#00FF00
yellow
#FFFF00
blue
#0000FF
fuchsia
#FF00FF
aqua
#00FFFF
white
#FFFFFF

Você pode usar o nome ou o número hexadecimal.

Exemplo:

<html>
<head>
<title>Alterando a cor do texto</title>
</head>
<body>
<h1 align="center">Alterando a cor do texto</h1>
<p><font size="5" color="green">Este texto está em verde</font></p>
<p><font size="5" color="#FF0000">Este texto está em vermelho</font></p>
<p><font size="5" color="blue">Este texto está em azul</font></p>
</body>
</html>


[ Voltar ] [ Índice ] [ Avançar ]