It can be used within articles, in the header or footer, or to define navigation.
Represents a section of a document, such as header, footer etc. Chances are you are living in the past or working on a project that was built in the past that is still marking up content using DIV tags instead of semantic tags like article and section. .category .course_info What does this do? Typically, but not always, sections have a heading. The div tag is a block level HTML element. A perfect example of the use of a div tag is to designate a navigation list: Presenting Content
is a new HTML 5 element that defines an important section of a document. The Section Element. table.categorylist td This one targets td only inside table with class of categorylist. There is an attempt at defining conventions on how/where you should use differently named block tags but div and section or main or header will be rendered the exact same in your documents. Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, PHP, Python, Bootstrap, Java and XML.
Represents the footer of a document or a section.
This allows for a tag oriented CSS which might be cleaner and allow for more flexibility. My experience has been that if you want to layout some piece of content differently than some other piece of content, those two are semantically distinct and thus should be marked up indepedently anyway.If OTOH, they aren't semantically distinct, then they should probably be layed out together. Tag Description
Represents the header of a document or a section. You will give the first pair of div tags a class of any name (it can be section or something else), if you want to style both divs the same way. to this part of the html document. The HTML
element represents a standalone section — which doesn't have a more specific semantic element to represent it — contained within an HTML document. The div tag would continue to be used for those divisions within the page where the division hasn’t been allocated a more specific tag to represent that particular content. .generalbox h2, #page h2.main, These are grouped together. Div Tag. You can use a section instead of those divs if you want to give a semantic distinction (like a header, article, e.t.c.) First targets any h2 with class generalbox?