top Piastrella
inizio

Translations Traduzioni

Translate to EnglishÜbersetzen Sie zum Deutsch/GermanΜεταφράστε στα ελληνικά/GreekПереведите к русскому/RussianOversetter til Norsk/NorwegianÖversätta till Svensk/Swedishहिन्दी अनुवाद करने के लिए/HindiTradueix al català/CatalanTulkot uz latviešu/LatvianPreložiť do slovenčiny/SlovakVertaal aan het Nederlands/Dutchترجمة الى العربية/ArabicTraduzca al Español/SpanishTraduisez au Français/FrenchTraduca ad Italiano/ItalianTraduza ao Português/PortugueseПереклад на українську/Ukrainian

What is the difference between id and class Qual è la differenza tra id e class

ID tags are very similar to class tag, that's is why many people are confuse. Targhette di identificazione sono molto simili ai tag di classe, che è motivo per cui molte persone si confondono. I always wonder this myself...here is what I know... Mi chiedo sempre io ... questo qui è quello che so ...

ID tag can only be use once on a single page. Etichetta di identificazione può essere solo usare una volta in una singola pagina. For example, you have <div id="something">content here</div> you can not use it again on the same page. Ad esempio, si hanno <div id="something"> contenuti qui </ div> non è possibile utilizzare nuovamente sulla stessa pagina. Actually, you can use the same id tags on the same page as many time as you like because many browsers do not enforce the HTML/XHTML rules but it will give you an error if you validate your page at w3c when you have two identical id tags on the same page. In realtà, è possibile utilizzare il tag stesso ID sulla stessa pagina come il tempo che vuoi, perché molti browser non rispettare il codice HTML / XHTML regole, ma che vi darà un errore se si convalidare la tua pagina al W3C quando si hanno due ID uguali tag sulla stessa pagina.

So each id tag must be unique on a single page. Così ogni tag id deve essere univoco su una sola pagina. Since id are only use once each page, it is very useful to identified a specific content on a page. Poiché id sono solo usare una volta ogni pagina, è molto utile per identificare un determinato contenuto in una pagina. For example, you have a id for the header and another unique id for the footer and if you want to have the link color for the header to be different from the footer you use id to separate the header and the footer. Ad esempio, si dispone di un ID per l'intestazione e un altro ID univoco per il piè di pagina e se si desidera avere il colore del link per l'intestazione di essere diverso dal piè di pagina si utilizza ID per separare l'intestazione e il piè di pagina.

It might seem that class are more powerful than id because you can only use id once per page, but that is not true. Potrebbe sembrare che la classe sono più potente di id, perché è possibile utilizzare solo id una volta per pagina, ma che non è vero. ID are more powerful than class and it can overwrite the class tags if the style conflict with each other. ID sono più potenti di classe e può sovrascrivere i tag classe se il conflitto in stile con l'altro.

That's all for now. Questo è tutto per ora. I hope this make sense. Mi auguro che questo senso. If you don't get it just post comment below and I'll do my best. Se non si ottiene solo post commento qui sotto e io farò del mio meglio.

More info on "What is the difference between id and class" with the below links. Più informazioni sul tema "Qual è la differenza tra id e class" con il seguente link.





Comments (0) Commenti (0) Trackbacks (0) Trackbacks (0)

No comments yet. Ancora nessun commento.

Write a Comment Scrivi un commento


No trackbacks yet. Ancora nessun trackback.