0

What the difference between IDs and classes ?

29th May 2018, 11:36 AM
MOHAMED BURMA MOHAMED ABDALLA
MOHAMED BURMA MOHAMED ABDALLA - avatar
6 Respostas
+ 5
ID : YOU CAN ONLY HAVE SINGLE ID NAME MEANS YOU CAN USE ID IN ANY OF HTML TAGS YOU WANT BUT ID NAME GIVEN TO ONE TAG CANNOT BE USED IN ANOTHER. EG : <p id="paragraph"></p> THAN YOU CANT USE ID NAME paragraph IN ANY OTHER TAG HAVING ID. YOU CAN SELECT IT USING #. CLASS : YOU CAN HAVE CLASS NAME AS MUCH AS YOU WANT. EG : <p class="paragraph"></p> <p class="paragraph"></p> YOU CAN HAVE MULTIPLE CLASS HAVING paragraph AS A NAME. YOU CAN SELECT IT USING (.).
29th May 2018, 11:57 AM
Meet Mehta
Meet Mehta - avatar
29th May 2018, 11:46 AM
Ulisses Cruz
Ulisses Cruz - avatar
+ 2
what language? if its html its easy ids have to be unique(per page). classes not.
29th May 2018, 11:48 AM
Lexfuturorum
Lexfuturorum - avatar
+ 1
MEET MEHTA thats the long way
29th May 2018, 11:58 AM
Lexfuturorum
Lexfuturorum - avatar
+ 1
Ids can only be applied once per page,while classes can be used as many times on a page as needed
6th Jun 2018, 12:35 PM
iq203
iq203 - avatar
+ 1
I'll say id can be used once in a page but class multiple times
12th Jun 2018, 11:58 PM
Donaustin
Donaustin - avatar