I’m pretty new to HTML5 and have been keeping it at arms length until I had a project of my oen where I could experiment with it. (I’m loving microdata btw)
I don’t want to go too far down the line with my site to find I’ve got the basics wrong so I want to ask about styling.
Normally using <div>s I’d add a style the usual way:
Yes you can. But I would only use those ids if absolutely necessary. If you need to target a specific header, nav or section element (as opposed to styling them all) then I’d suggest using a class instead. IDs are a bit of a slegehammer, and I hardly use them now. But if you only have, say, one nav element on the page, it’s pointless to give it a class or id too.
Since you’re interested in HTML5 for experimental reasons and to learn about it, I want to suggest regularly checking out html5doctor.com.
It’s an excellent resource for learning where to use which elements and (semantically) why. If you go through their older articles you’ll see how much HTML5 is changing as they write it (so don’t be surprised to see a newer article completely contradict an older one… that’s expected).