By mnfrancis
Friday, 26. September 2008, 05:41:15
22: Generic containers—the div and span elements
Sometimes you'll come across a grouping of content that doesn't have an existing HTML 4 element (or elements) that will suit it exactly. Typical archetypes include page headers, footers, and navigation menus. In these cases, you can wrap the content in a <div> or <span> element, and give it a class or id attribute. This will group it together and provide a hook to manipulate the content as a single entity using JavaScript or CSS at a later date. These generic elements are the subject of this article.( Read the article )