Untitled

De tipo

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            background-color: black;
            color: beige;
        }
    </style>
</head>
<body>
    <header>
        <div>
            <p>Hola Enfermera</p>
        </div>
    </header>
</body>
</html>

De clase

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
	         .de_clase {
            background-color: blueviolet;
            color: black;
        }
    </style>
</head>
<body>
    <header>
        <div class="de_clase">
            <p>segundo parrafo</p>
        </div>
    </header>
</body>
</html>

De ID

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
       #ide {
            background-color: aqua;
            color: black;
        }
    </style>
</head>
<body>
    <header>
       <div id="ide">tercer parrafo</div>
    </header>
</body>
</html>

De atributo

  1. Básicamente, al igual que con las clases, podemos seleccionar varios elementos, pero ahora filtrándolos por su atributo href
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        a [href= "<https://developer.mozilla.org/es/docs/Web/CSS/Attribute_selectors>"]{
            background-color: brown;
            color: antiquewhite;
        }
    </style>
</head>
<body>
    <header>
         <div id="ide">
            <a href="<https://developer.mozilla.org/es/docs/Web/CSS/Attribute_selectors>">tercer parrafo</a>
        </div>
    </header>
</body>
</html>

Universal