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
33
votes
6 answers

When to use
line breaks vs CSS positioning?

I've often wondered about the proper use of a
line break. Seems that often they are incorrectly used for positioning or clearing content where CSS should instead be used. W3schoools.org says to use
for blank lines, but not for creating…
brandonjp
  • 3,018
  • 2
  • 28
  • 27
33
votes
4 answers

Is it good to put a   inside an empty ?

If this is the structure: …
Jitendra Vyas
  • 148,487
  • 229
  • 573
  • 852
33
votes
4 answers

Use of profile attribute in HTML head tag

What is the use of profile attributes in the HTML tag? I happened to read about it in here : http://www.w3schools.com/tags/tag_head.asp. I could not understand this(http://www.w3.org/2002/12/namespace) either, since it is too technical (for…
rajakvk
  • 9,775
  • 17
  • 46
  • 49
32
votes
3 answers
32
votes
4 answers

What's the best HTML5 tag to use for marking up blog excerpts?

It's a common pattern for blogs to have archive pages (eg by date or category) which list relevant blog posts, along with excerpts (a paragraph or) and a link. I can't quite work out which of the HTML5 elements it's best to use for the individual…
Frankie Roberto
  • 1,349
  • 9
  • 9
30
votes
3 answers

What was the thinking behind the implementation of the dropdown menu in Twitter Bootstrap?

I've been looking at Twitter's Bootstrap framework and I'm really impressed. However, I don't understand the thinking behind the way the dropdown navigation menu works. Firstly, in order to see child links, you have to click on the parent. I can see…
iagdotme
  • 1,033
  • 2
  • 21
  • 38
30
votes
10 answers

Is semantic markup too open-ended?

I am taking a peek at Dive Into HTML5. It seems nice and interesting, but I am puzzled. In the 1990s, at the time when Netscape was the browser and HTML was HTML2 or HTML3, there were a lot of tags: address, cite, code... Most of them are unused as…
Stefano Borini
  • 138,652
  • 96
  • 297
  • 431
29
votes
2 answers

Should a heading be inside or outside a

?

I have a div element and within that div, we have text between p elements. I want to add a heading. Should it go inside or outside the p? Which is better:

This is text

This is my h3

More text

another text

or

This…

JamalDols
  • 471
  • 1
  • 4
  • 15
28
votes
3 answers

When is it semantically correct to use the hr element?

The HTML5 reference says that The hr element represents a paragraph-level thematic break, e.g. a scene change in a story, or a transition to another topic within a section of a reference book. That description is not enough descriptive to me. I…
federico-t
  • 12,014
  • 19
  • 67
  • 111
28
votes
4 answers

When can I safely use the new
element in HTML5?

On the 16th December, a HTML5 extension specification for the
element was submitted to the W3C under something called an editors draft. The abstract is as follows: This specification is an extension to the HTML5 specification [HTML5]. It…
rickyduck
  • 4,030
  • 14
  • 58
  • 93
27
votes
2 answers

Why do navigation bars in HTML5 as lists?

Since I started out using HTML, CSS, etc., one consistent thing I have always noticed is that navigation bars nearly always seemed to be presented as lists, in some variant of: HTML:
26
votes
1 answer

Are block-level elements allowed inside inline-level elements in HTML5?

For an example Is

Heading

valid in HTML5?
Jitendra Vyas
  • 148,487
  • 229
  • 573
  • 852
26
votes
4 answers

Marking up a search result list with HTML5 semantics

Making a search result list (like in Google) is not very hard, if you just need something that works. Now, however, I want to do it with perfection, using the benefits of HTML5 semantics. The goal is to define the defacto way of marking up a search…
Johan
  • 5,003
  • 3
  • 36
  • 50
26
votes
2 answers

How to semantically code an HTML nested table that aligns (and associates) with its parent table's headers

Edit: The selected answer contains a link to the working fiddle I was able to compose without the use of a nested table. I want to semantically code a table in HTML with a layout like the picture below. Unfortunately I haven't been able to find…
Evan Driscoll
  • 267
  • 1
  • 3
  • 7
26
votes
3 answers

Correct use of the tag, or how to markup "less important" text

Yet another tag that was given new meaning in HTML5, apparently lives on: http://www.w3.org/TR/html-markup/small.html#small The small element represents so-called “fine print” or “small print”, such as legal disclaimers and caveats. This…
Wesley Murch
  • 101,186
  • 37
  • 194
  • 228
1 2
3
67 68
I don't need anything here, should I always put a   here? item
model one