martes, 3 de noviembre de 2015

programación html 5, ATRIBUTOS.

El atributo id y el atributo class
Atributo id
<!DOCTYPE html>
<html>

<style>
p#p01 {
    color: blue;
}
</style>

<body>

<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p id="p01">I am different.</p>

</body>
</html>


This is a paragraph.
This is a paragraph.
This is a paragraph.
I am different.

Atributo class
<!DOCTYPE html>
<html>

<style>
p.error {
    color: red;
}
</style>

<body>

<p>parrafo.</p>
<p>parrafo.</p>
<p class="error">Soy rojo.</p>
<p>parrafo.</p>
<p class="error">Yo tambien soy rojo.</p>

</body>
</html>




parrafo.
parrafo.
Soy rojo.
parrafo.
Yo tambien soy rojo.


Prueba atributo id









Prueba atributo class









No hay comentarios:

Publicar un comentario