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.
---------------------------------------------------------------------------------------------codice:<!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>
codice:<!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>

Rispondi quotando