3. CSS classes¶
A class is a name invented by us that will store a specific style. The class and its styles are defined in the CSS sheet and used in the HTML document.
Exercise¶
File css-classes.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <!doctype html>
<html>
<head>
<title> Estilos definidos por Clases </title>
<link rel="stylesheet" type="text/css"
href="css-clases.css" >
</head>
<body>
<h1> Estilos definidos por Clases </h1>
<p> Párrafo con estilo por defecto </p>
<p class="estilo2"> Párrafo con estilo propio. Con estilo2 </p>
<ul>
<li> Lista con estilo por defecto </li>
<li class="estilo3"> Lista con estilo propio. Con estilo3 </li>
</ul>
</body>
</html>
|
File css-classes.css

Result¶
