id

What's The Difference Between Ids and Classes?

in

ID and class selectors are both used to identify and select html objects, such as a div, an area of text, an image, a link etc, that you want to apply styles to.
They both function in a very similar way, so you'll be forgiven for wondering why it makes a difference which one you pick.
You should note that applying a Class or ID (With no predefined styles) to something, doesn't actually do anything by itself, if no styles are applied to the ID or Class then nothing will change and it will look exactly the same, as if you did nothing at all.

Syndicate content