03-30-2010, 06:46 AM | #1 |
Guru
Posts: 718
Karma: 1085610
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-T1, 1825PT, Galaxy Tab, One X, TF700T, Aura HD, Nexus 7
|
<em> or <i> & <strong> or <b>
I know some prefer to use <i> and <b> instead of <em> and <strong>, but as far as I can see they are rendered the same.
Can someone explain to me what is the difference between them and why I should use one or the other. Also, are there any circumstances where you would mix their use? |
03-30-2010, 07:16 AM | #2 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
<em> and <strong> are semantic, <i> and <b> are presentational. <em> means emphasized, and while the default is having emphasized text displayed in italics, you could choose to have it underlined, or red, or in a different font... <i> means italic, and while it is possible to change its appearance with CSS, it would be weird to have an <i> element that's not italic. It's basically a matter of style, with the content and presentation separation encouraged by HTML+CSS, semantic markup is preferred.
|
Advert | |
|
03-30-2010, 07:37 AM | #3 |
Guru
Posts: 718
Karma: 1085610
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-T1, 1825PT, Galaxy Tab, One X, TF700T, Aura HD, Nexus 7
|
That makes sense, thanks Jellby.
If I didn't apply any style to <em> and <strong>, I take it that they would used defaults of italic and bold for their behaviour? |
03-30-2010, 08:01 AM | #4 |
Wizard
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
The semantic tags <em> and <strong> are preferred for general html because they work better with audio browsers and other text-to-speech systems. They should default to italic and bold respectively, so there's no practical difference unless you want your content to work well with TTS.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Strong rumours Ipad 2 could be available by Christmas | garygibsonsf | News | 22 | 08-19-2010 12:02 PM |
Over 21K downloads and still going strong | JanG | Writers' Corner | 13 | 02-14-2010 05:39 AM |
Wood Hard Case - Very Strong | badspell68 | Sony Reader | 5 | 02-19-2009 04:12 PM |
Looking for a strong case in the US | DesiLinguist | iRex | 0 | 02-19-2009 10:28 AM |