HiveBrain v1.2.0
Get Started
← Back to all entries
snippethtmlMinor

Is this a good way to create an article in HTML5?

Submitted by: @import:stackexchange-codereview··
0
Viewed 0 times
thiscreatewayhtml5goodarticle

Problem

Is this the good way to create a portfolio article in HTML5 or do you have any suggestions?

Not sure about the section but I need it as overlay over the image. Is it better to use a DIV instead?


   
     
       Ski Trail
       20th March, 2010
     

     
       Graphic
     
   

   

Solution

A good reference for element semantics would be HTML5 Doctor. You can read all about the tags and their intended purposes. From their overview for `, and :

Section

Represents a generic document or application section. In this context, a section is a thematic grouping of content, typically with a header, possibly with a footer. Examples include chapters in a book, the various tabbed pages in a tabbed dialog box, or the numbered sections of a thesis. A web site's home page could be split into sections for an introduction, news items, contact information.
Article

Represents a section of a page that consists of a composition that forms an independent part of a document, page, or site. This could be a forum post, a magazine or newspaper article, a Web log entry, a user-submitted comment, or any other independent item of content.
Div

The div element has no special meaning at all. It represents its children. It can be used with the class, lang, and title attributes to mark up semantics common to a group of consecutive elements.

Their analogy of
is a chapter, an is a section of the page. Chapters contain articles, not the other way around. A ` might be more appropriate, since it has no meaning.

Context

StackExchange Code Review Q#44073, answer score: 3

Revisions (0)

No revisions yet.