From the course: CSS: Float-Based Page Layouts (2012)

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Adding meaning with classes and IDs

Adding meaning with classes and IDs - CSS Tutorial

From the course: CSS: Float-Based Page Layouts (2012)

Start my 1-month free trial

Adding meaning with classes and IDs

Although we've created the initial structure of our page, our content currently has no semantic meaning at all. In fact, without actually examining the content itself, there's no way to establish the role of the content regions or how they relate to each other. Now, actually from a layout view, that doesn't really matter. Layouts can be created using whatever type of elements and whatever organization that you want. Semantic value doesn't really play into CSS page layout at all. However, leaving out this information would not be a very good practice, and it would make it very difficult for anybody parsing our code to figure out what's going on. So with that in mind, we're going to add some organization and meaning to our page by using the class and ID attributes. Now if you've watched any of my other titles, you've probably heard me say that I often see designers make the mistake of simply using class and ID values for styling. Now, while they are certainly acceptable for that--you…

Contents