Visualizzazione dei risultati da 1 a 4 su 4

Visualizzazione discussione

  1. #1

    Dimensioni della scritta differenti tra elementi HTML e uso di <span> e class

    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>
    Ultima modifica di KillerWorm; 12-10-2019 a 16:09 Motivo: Titolo (era "Dubbi HTML") e tag CODE

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.