Semantic HTML of an articles list

I’d use an article for each snippet (i.e. a news teaser). Each article contains an h1 element for the heading, an img element for the image, and p element(s) for the text. As you probably want to link to a full version, you could enclose all elements in one a element (which is allowed in … Read more

nav role=navigation

It is true that most modern browsers/technologies recognise the HTML5 <nav> element as navigation and give it the same attention. But explicitly setting the role=”navigation” attribute just makes sure that a lot more technologies can pick it up. For example screen-readers and other technologies for users with disabilities are very rarely fully standards compliant (especially … Read more

What html markups to use for displaying label/value data?

I think the most semantically correct would be <dl>, <dt> and <dd>, since what you’re displaying are effectively definitions of first name, age and e-mail. <dl> <dt>First Name</dt> <dd>Dominic</dd> <dt>Age</dt> <dd>24</dd> <dt>E-mail</dt> <dd>foo@bar.com</dd> </dl> However, obviously, the easiest way to display it in a table is using <table>, <th> and <td>. You could hack together … Read more

Using custom HTML Tags

Most of these responses are good general advice, but not proper answers to the question, which I think is perfectly legitimate. HTML5 is already a moving target; browsers implement specs and innovate at different paces. There is no single thing called “valid HTML”, at least not that is worth using. If you are building a … Read more

Is it ok to use in place of blindly?

As others have mentioned, using <strong>, <em>, <cite> etc. adds semantics. This is important because you say something about why you want to emphasize something and increase the readability of your html, because you know why it’s in bold. Furthermore, screen readers use the strong tags to make an audible difference when reading it aloud. … Read more

What is the proper HTML entity for the “x” in a dimension?

× Unicode: U+00D7 MULTIPLICATION SIGN HTML: &times;, &#215; CSS: \00d7 See the Wikipedia article about the multiplication sign: In mathematics, the symbol × (read as times or multiplied by) is primarily used to denote the […] Geometric dimension of an object, such as noting that a room is 10×12 feet in area. Depending on the … Read more

Best HTML5 markup for sidebar

First of all ASIDE is to be used only to denote related content to main content, not for a generic sidebar. Second, one aside for each sidebar only You will have only one aside for each sidebar. Elements of a sidebar are divs or sections inside a aside. I would go with Option 1: Aside … Read more