Los colores en HTML se especifican con nombres de colores predefinidos o con valores RGB, HEX, HSK, RGBA o HSLA.
Nombres de colores
Background: Puede establecer el color de fondo de un elemento HTML
Ejemplos:
<h1 style="background-color:Tomato;">Tomato</h1>
<h1 style="background-color:Orange;">Orange</h1>
<h1 style="background-color:DodgerBlue;">DodgerBlue</h1>
<h1 style="background-color:MediumSeaGreen;">MediumSeaGreen</h1>
<h1 style="background-color:Gray;">Gray</h1>
<h1 style="background-color:SlateBlue;">SlateBlue</h1>
<h1 style="background-color:Violet;">Violet</h1>
<h1 style="background-color:LightGray;">LightGray</h1>
Tomato
Orange
DodgerBlue
MediumSeaGreen
Gray
SlateBlue
Violet
LightGray
<p style="color:DodgerBlue;">Lorem ipsum...</p>
<p style="color:MediumSeaGreen;">Ut wisi enim...</p>
Hello World
Lorem ipsum...
Ut wisi enim...
Color del borde
Puede establecer el color de los bordes. Ejemplo:
<h1 style="border:2px solid Tomato;">Hello World</h1>
<h1 style="border:2px solid DodgerBlue;">Hello World</h1>
<h1 style="border:2px solid Violet;">Hello World</h1>
Resultado:
Hello World
Hello World
Hello World
<h1 style="background-color:#ff6348;">...</h1>
<h1 style="background-color:hsl(8, 90%, 94%);">...</h1>
<h1 style="background-color:rgba(257, 89, 61, 0.6);">...</h1>
<h1 style="background-color:hsla(5, 19%, 68%, 0.7);">...</h1>
...
...
...
...
...
Siguiente capítulo
No hay comentarios.:
Publicar un comentario