DOMANDA Dubbio HTML (dimensioni - uso di span)

Pubblicità

MPG

Utente Attivo
Messaggi
566
Reazioni
4
Punteggio
55
Scusate sono all'inizio con l'html mi potete spiegare perchè usando il primo listato la scritta "Paris is the capital of France" viene piu' piccola di "Paris" sopra?
Nel secondo important è sempre in rosso ma non capisco bene l'uso di span.note sopra e poi invece l''uso di
span class="note">Important</span> piu' sotto che porta la parola important and essere sempre rossa.
Grazie a tutti.

HTML:
<!DOCTYPE html>
<html>
<style>
.city {
background-color: tomato;
color: white;
padding: 10px;
}
</style>
<body>

<h2>Same Class, Different Tag</h2>
<p>Even if the two elements do not have the same tag name, they can have the same class name, and get the same styling:</p>

<h2 class="city">Paris</h2>
<p class="city">Paris is the capital of France.</p>

</body>
</html>

HTML:
<!DOCTYPE html>
<html>
<head>
<style>
span.note {
  font-size: 120%;
  color: red;
}
</style>
</head>
<body>

<h1>My <span class="note">Important</span> Heading</h1>
<p>This is some <span class="note">important</span> text.</p>

</body>
</html>
 
Ultima modifica:
ciao in che senso viene piu grande??
Hai dichiarato un h2 con class city e lo span con la stessa classe.
 
Pubblicità
Pubblicità
Indietro
Top