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
650
votes
7 answers

What are the advantages/disadvantages of using the tag for icons instead of ?

Facebook's HTML and Twitter Bootstrap HTML (before v3) both use the tag to display icons. However, from the HTML5 spec: The I element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose, such as a…
Jashwant
  • 28,410
  • 16
  • 70
  • 105
412
votes
9 answers

vs
 vs  for inline and block code snippets

My site is going to have some inline code ("when using the foo() function...") and some block snippets. These tend to be XML, and have very long lines which I prefer the browser to wrap (i.e., I don't want to use
). I'd also like to put CSS…
Steve Bennett
  • 114,604
  • 39
  • 168
  • 219
320
votes
10 answers

input type="submit" Vs button tag are they interchangeable?

input type="submit" and button tag are they interchangeable? or if there is any difference then When to use input type="submit" and when button ? And if there is no difference then why we have 2 tags for same purpose?
Jitendra Vyas
  • 148,487
  • 229
  • 573
  • 852
220
votes
5 answers

Valid to use (anchor tag) without href attribute?

I've been using Twitter Bootstrap to build a site, and a lot of its functionality depends on wrapping things in , even if they're just going to execute Javascript. I've had problems with the href="#" tactic that Bootstrap's documentation…
Zacqary
  • 2,255
  • 2
  • 15
  • 7
215
votes
12 answers

CSS/HTML: What is the correct way to make text italic?

What is the correct way to make text italic? I have seen the following four approaches: Italic Text Italic Text Italic Text Italic Text This is the "old way". has…
Rupert Madden-Abbott
  • 12,899
  • 14
  • 59
  • 74
165
votes
9 answers

Is a DIV inside a TD a bad idea?

It seems like I heard/read somewhere that a
inside of a was a no-no. Not that it won't work, just something about them not being really compatible based on their display type. Can't find any evidence to back up my hunch, so I may be…
jcollum
  • 43,623
  • 55
  • 191
  • 321
123
votes
10 answers

Span inside anchor or anchor inside span or doesn't matter?

I want to nest span and a tags. Should I Put inside Put inside It doesn't matter ?
user214582
118
votes
4 answers

Most common way of writing a HTML table with vertical headers?

Hi all it's been a while since I've asked something, this is something that has been bothering me for a while, the question itself is in the title: What's your preferred way of writing HTML tables that have vertical headers? By vertical header I…
Tristian
  • 3,406
  • 6
  • 29
  • 47
117
votes
10 answers

How to semantically provide a caption, title or label for a list in HTML

What is the proper way to provide a semantic caption for an HTML list? For example, the following list has a "title"/"caption". Fruit Apple Pear Orange How should the word "fruit" be handled, in a such way that it is semantically associated with…
Jon P
  • 19,442
  • 8
  • 49
  • 72
114
votes
9 answers

Which HTML5 tag should I use to mark up an author’s name?

For example of a blog-post or article.

header

John My article....

The author tag doesn't exist though... So what is the commonly used HTML5 tag for authors? Thanks. (If there…
Quang Van
  • 11,475
  • 12
  • 57
  • 61
106
votes
4 answers

Why is not in HTML 5 Tag list while is?

Shouldn't both be removed? Or does it mean we should use ? Why is removed but is not? What is the problem with which does not apply to ? http://www.w3schools.com/html5/html5_reference.asp
Jitendra Vyas
  • 148,487
  • 229
  • 573
  • 852
101
votes
10 answers

Is it correct to use DIV inside FORM?

I'm just wondering what are you thinking about DIV-tag inside FORM-tag? I need something like this:
some
another
Is it general practice to use DIV inside…
ceth
  • 44,198
  • 62
  • 180
  • 289
94
votes
14 answers

Semantics and Structure of Name-Value Pairs

This is a question I have been struggling with for a while. What is the proper way to mark up name/value pairs? I'm fond of the
element, but it presents a problem: There is no way to separate one pair from another - they have no unique…
Ryan Kinal
  • 17,414
  • 6
  • 46
  • 63
89
votes
4 answers

Correct Semantic tag for copyright info - html5

What would be the best and most semantic tag/method for including a copyright notice in the footer of a web site?
David
  • 1,209
  • 2
  • 11
  • 10
83
votes
3 answers

How to properly use h1 in HTML5

Which of the following is the correct way to structure a page: 1) h1 only in header

Site title

Page title

If I use h1 exclusively inside header as the site's…
deb
  • 12,326
  • 21
  • 67
  • 86
1
2 3
67 68