Questions tagged [semantic-markup]

Semantic Markup is using specific elements based on their intended meaning, as well as separating content from presentation, in HTML, Use this tag for questions about using semantic markup in HTML.

Semantic Markup is using specific elements based on their intended meaning, as well as separating content from presentation, in HTML, Use this tag for questions about using semantic markup in HTML.

1011 questions
82
votes
8 answers

Best HTML5 markup for sidebar

I'm setting up my WordPress sidebars for an HTML5 theme and really wanting to use before_widget and after_widget right. So my question is this: which of the two markup patterns is more appropriate? The following code is all completely outside the…
mrwweb
  • 1,344
  • 2
  • 12
  • 22
73
votes
3 answers

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

Is the proper HTML entity for giving dimensions ×? I want to be semantically correct, but that begs the question, is listing a dimension as 2" x 3" even semantic? If the x represents "by", would I use the letter x or ×? In my code I've been…
Nick
  • 2,872
  • 3
  • 34
  • 43
54
votes
9 answers

Is it ok to use in place of blindly?

Note: I know is presentational and
Jitendra Vyas
  • 148,487
  • 229
  • 573
  • 852
53
votes
10 answers

Using custom HTML Tags

In my HTML I was curious if it was semantically correct to use unique identifiers such as rather than an

. For example: I wanted to have:   With the CSS: toys { background: url("toys.png")…

Noob
  • 563
  • 1
  • 4
  • 8
53
votes
6 answers

HTML5 nav element vs. role="navigation"

Do all of the following carry the same semantic meaning? If not please explain your answer. 1.
Web_Designer
  • 72,308
  • 93
  • 206
  • 262
49
votes
6 answers

Is it necessary to have in every table?

Is it necessary to have in every table? According to Standards.
Jitendra Vyas
  • 148,487
  • 229
  • 573
  • 852
48
votes
4 answers

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

I want to render a profile user container that contains a list of labels and their associated values. Here is an excerpt of information and layout I'd like to display: First…
fabien7474
  • 16,300
  • 22
  • 96
  • 124
41
votes
5 answers

Semantic HTML of an articles list

In a typical index of articles (like a blog without excerpt) like this image: those items should be a list (
  • ) or just divs? And also, they should be figure/figcaption? Because would make some sense, but also... picture is part of an artcile…
felixjet
  • 605
  • 1
  • 6
  • 11
41
votes
4 answers

nav role=navigation

I'm a little confused with roles. If I have in my page a navigation that is enclosed in a nav element and specify a role="navigation". Isn't it already semantically explicit that the nav section is…
Artem Svirskyi
  • 7,305
  • 7
  • 31
  • 43
38
votes
4 answers

What is the most semantic way to display a street address in HTML?

I have an address that is going to be displayed on a webpage, but it is not the address for the author of the page. How should this be coded to be semantic given the w3c recommendation of: The ADDRESS element may be used by authors to supply…
tomk
  • 662
  • 1
  • 6
  • 10
35
votes
2 answers

Should I have aside element ouside or inside of main element?

Let's say aside element includes "Oh, by the way …" content such as reading suggestions, advertisements, or cross sells. Is it semantically okay to have aside outside of main? If yes, does it have any advantage over accessibility if I keep aside…
Pratik Mehta
  • 2,037
  • 2
  • 14
  • 19
35
votes
2 answers

Semantically-Accurate HTML5 Element for a Modal Dialog

I was wondering what some of my fellow web developers/designers felt would be the best HTML 5 element to use for a modal dialog like a lightbox, superbox, thickbox, or whatever your favorite flavor might happen to be. Since these types of UI's don't…
KyleFarris
  • 17,274
  • 5
  • 40
  • 40
34
votes
4 answers

Why does the W3C advise wrapping input elements in

tags?

I've seen a lot of examples on the web where forms are laid out like so:

To my surprise, this is also described in the specification: Any form starts with a form element, inside which are placed the controls. Most…
Radu
  • 8,561
  • 8
  • 55
  • 91
34
votes
6 answers

Which is more "semantic HTML" for error messages?

We were discussing with a co-worker and trying to decide on what HTML element to use for a form validation error message. One of us is saying that we should use a span or a div because it is a part of an input field, and the other is saying that it…
Ege
  • 1,142
  • 1
  • 8
  • 13
34
votes
3 answers

Schema.org give a div a itemprop="image"?

I am replacing an image with a
with background-image for the reason of background-size: cover; The page is structured the same way as before with a image just that "the image" is a div now. Does is makes sense to give that itemprop to a
?
Wayne's World
  • 387
  • 1
  • 3
  • 11
1
2
3
67 68