- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
hey , just wondering, im making just a quick runndown static website and using html5. but remembered that in one of my previous posts that the HTML 5 wasn’t cross browser proper for me. i dont know it was mental!
but here’s the code. so far
THIS IS MY WEBPAGE TITLE
This is the website title Inside the header
This is the some quote or sloagen
This may change per page.
This may change per page.
This may change per page.
This may change per page.
so my real question was, should i be naming every div? (giving it an “ID” or “Class”?? if so ? howcome
or why not?
and is it good practice?
So, heres what the difference between classes and IDs are.
IDs are used for elements that don’t repeat (ones that you only have one of) such as #footer
Classes are used for repeating things such as an LI element inside of a UL.
Your code wont validate if you have more than one of the same ID on the same page.
Hope that helps
You don’t HAVE to – depends what you want to do really.
You don’t have to give it anything apart from the name