tags:

views:

198

answers:

5
+4  Q: 

HTML <strong> tag

Is using more than one

<strong> 

tag actually make the word stronger?

i.e. is

<strong><strong>abc</strong></strong>

stronger than

<strong>abc</strong>

?

I'm asking this because if you view the HTML source of the official website of North Korea, http://www.korea-dpr.com/ you will see it has many strong tags. Is this supposed to be something like an IE hack?

Thanks in advance.

+12  A: 

alt text

Yes, you can nest strong tags and the more you nest, the stronger it becomes. Although I'd say beyond 2-3 nested is extraneous.

The relative level of importance of a piece of content is given by its number of ancestor strong elements; each strong element increases the importance of its contents.

Source: HTML 5 spec

Some modern user agents will apply font-weight:bolder; to strong, though since it's already bold you won't really notice a visual difference. If you want, you can apply a rule such as the % so nested strong elements become larger, as indicated in the other answer.

Some screen readers might dictate the word out more loudly.

Seems like JAWS/Window Eyes screen readers don't indicate importance, according to this.

meder
Do you have a source for this? I believe you, but I'm curious about the specifics.
Syntax Error
@Gert G - Actually I was wrong. I updated with a link to tests.
meder
Wow, imagine a screen reader that dictates words incrementally loudly trying to read that site. Ears will bleed.
BoltClock
Never mind my last comment. Sometimes I just need to read things twice. Edit: Oh, but you just did. My bad.
Syntax Error
I sneaked it in :)
meder
+1  A: 

Theoretically, I think it could be made to do this with a relative CSS declaration like such:

strong { font-size: 120%; }
recursive
`font-size` will only increase the size of the text, not the weight. I think what he needs is `font-weight`. See my answer below.
Wallace Breza
+2  A: 

<strong> is a semantic tag, as all HTML tags. It don't say that that word is bold, but that have a strong emphasis. You have to use CSS to style the element.I suggest you to read this CSS Property: font-weight and the whole website. Anyway usually web fonts don't have more than one level of "boldness" so you have to denote emphasis in another way (font size, color, etc...)

s.susini
According to CSS1 standards they do have more than 1 level of boldness, hence the "bolder" and "lighter" values for the font-weight property. You are right however that it doesn't look much different in most browsers, so practical use of that is questionable.
Syntax Error
He's talking about the fonts themselves. I.e. you will have *Verdana Medium* and *Verdana Bold* but not also *Verdana Book,* *Verdana Extra Light,* etc.
Cirno de Bergerac
A: 

I don't think nesting <strong> tags will make it stronger.

Edit Guess I was wrong about nesting bold tags make the font stronger based on other answers.

I would recommend using CSS with class names instead of <strong>. The CSS font-weight property offers a variety of options that you can use to incrementally bold a word

.strong
{
    font-weight: bold; 
    /* Other options bold, bolder, lighter, normal, 100...900 */
}

.stronger
{
    font-weight: bolder;
}

.strongest
{
    font-weight: 900;
}
Wallace Breza
There's no point really in making it a class. You should be using a CSS reset anyway, so why make a new class for something that's already built-in? In addition, I think class selector are the most inefficient in CSS rendering speed, so using the built-in <strong> tag would also be faster (though I'm not sure there would be a noticeable difference)
Bradley Herman
Wow, down voted for providing a CSS alternative?
Wallace Breza
@Bradley Herman, its just an example. In the real work it would probably be combined with other CSS properties to give the desired full outcome. You can also make multiple classes such as `.strong`, `.stronger` and `.strongest`.
Wallace Breza
I didn't vote you down, but the reason was probably that your original post was a CSS alternative to simpler CSS. No need for a class name if you're styling the tag. Your edit does make sense since it's now a preferable solution to nesting multiple strong tags.
Syntax Error
In my original example there was just a `.strong` class. But it was a class so it could be applied to any element not just `<strong>` tags.
Wallace Breza
+1  A: 

Like other have said, use a percentage if you want each nested one to make it even larger. If you want (I don't know why you would) to control explicitly how many deep you can go and what other attributes that entails, then you could also say

strong { font-weight: 100; }
strong strong { font-weight: 300; font-size: 1.1em }
strong strong strong { font-weight: 500; font-size: 1.1em; color: red; }

edit: by percentage, i meant to use font-weight: bolder... not percentage font-weights (which I'm not sure are supported)

Bradley Herman
I believe that font-weight:normal; = font-weight:400; so it should start there :)
Mark Schultheiss