computer_master — 2008-10-03T02:18:09-04:00 — #1
plz tell me the
Difference between Bold and Strong tag of HTML
autisticcuckoo — 2008-10-03T02:24:38-04:00 — #2
i element types indicate that the content should be boldfaced or italicised, respectively, normally to adhere to some typographic convention. They don't imply any sort of emphasis, only a presentational change.
strong element types indicate that the content should be emphasised or strongly emphasised, respectively. They don't imply any specific presentation, although all contemporary browsers render
em in italics and
strong in bold by default.
i are presentational, while
strong are semantic.
felgall — 2008-10-03T02:54:03-04:00 — #3
Perhaps an easy way to consider the difference is to think about how a web reader will speak the content based on the surrounding tags. With <em> and <strong> the reader can apply emphasis and strong emphasis to the content in the way that it says it. The web reader cannot speak in italic or bold and so there is no obvious way that the web reader should handle those tags - it would all depend on what you had in the style sheet to define how those thags should affect the way their content is spoken.
cooper_semantics — 2008-10-03T23:57:25-04:00 — #4
Being that they are two totally different tags, it is like comparing <font size="6">..</font> to a h1 tag.
If you want an element bold, use css to handle the styling. I really wish that the strong tag was not set to bold by default. I think it really confuses a lot of developers.
Listen to Tommy and Stephen.
c_ankerstjerne — 2008-10-04T19:20:50-04:00 — #5
I to some extent disagree with the B and I tags being purely presentational. There are cases where it is semantically required for text to be italiced (and probably boldfaced as well). In these cases, it would be wrong to use CSS to add the effect.
cooper_semantics — 2008-10-04T20:05:22-04:00 — #6
cooper_semantics — 2008-10-04T20:09:51-04:00 — #7
@C. Ankerstjerne - Could you show an example of when it is 'proper' to use a b or i tag?
oddz — 2008-10-04T21:50:30-04:00 — #8
Yeah… its never appropriate to use b or i in place or strong of em. Bold and italic describe presentation while em and strong outline hierarchy.
autisticcuckoo — 2008-10-05T14:36:44-04:00 — #9
Can you give an example? If you're thinking about typographic conventions, then it doesn't have to do with semantics. The semantic way to mark up the name of a ship would be
<ship>Titanic</ship>, but HTML doesn't have that semantic richness. Since ship names are traditionally italicised, the correct way to mark it up in HTML would be
I'm sorry, but that's plain wrong.
strong denote emphasis. Thus
<em>Titanic</em> would be wrong unless you really mean to emphasise the name, whereas
<i>Titanic</i> is semantically neutral and only denotes italics. You could use
<span class="ship">Titanic</span> and use CSS to make it italic, but you'd gain nothing.
Hierarchy? How so? They denote semantic emphasis, that's all.
c_ankerstjerne — 2008-10-05T16:06:07-04:00 — #10
My favorite example is book titles in bibliographical references. As per ISO 690, these has to be italicised, so using CSS would not convey the full meaning.
cooper_semantics — 2008-10-05T16:29:23-04:00 — #11
You might be correct but, would 'emphasizing' a title be incorrect?
Could you not replace the <i> with an <em> and actually convey meaning?
logic_earth — 2008-10-05T16:32:03-04:00 — #12
Only if you are emphasizing the title of the book. You are not emphasizing a book title in bibliographical references.
c_ankerstjerne — 2008-10-05T17:02:12-04:00 — #13
As logic_earth says, it isn't emphasised, only italicised. ISO 690 doesn't mention anything about emphasis.
autisticcuckoo — 2008-10-06T01:44:44-04:00 — #14
If it's a reference, then it should be marked up with
<cite>, which – coincidentally – is rendered in italics by default.
c_ankerstjerne — 2008-10-06T03:57:54-04:00 — #15
CITE refers to the entire bibliographical reference, not just the title. Marked up properly, it would be styled as such:
<i>Cyclotron waves in plasma</i>.
Translated by AN Dellis; edited by SM Hamberger.
1st ed. Oxford : Pergamon Press, 1981.
International series in natural philosophy.
Translation of : Ciklotronnye volny v plazme.
This can be extended with my proposed microformat:
<span class="primary_responsibility">LOMINADZE, DG</span>.
<i><span class="title">Cyclotron waves in plasma</span></i>.
<span class="translator">Translated by AN Dellis</span>;
<span class="editor">edited by SM Hamberger</span>.
<span class="edition">1st ed.</span>
<span class="city">Oxford</span> :
<span class="publisher">Pergamon Press</span>,
<span class="extent">206 p.</span>
<span class="series">International series in natural philosophy</span>.
<span class="notes">Translation of : Ciklotronnye volny v plazme</span>.
cooper_semantics — 2008-10-06T10:17:32-04:00 — #16
Your example, by default would make the entire block of text italic. So the <i> tag is kind of useless, since the whole debate is probably with styles turned off. Otherwise, you would use css to style the entire thing correct?
Also, this would not validate unless you wrapped a block level element around the cite tag.
c_ankerstjerne — 2008-10-06T11:45:17-04:00 — #17
That the entire block is italicised by default is an unfortunate consequence of using the proper semantics. The CITE element isn't the only case where this is true. Semantics always comes before presentation, and since it is easily corrected with CSS, I don't consider it a significant concern.
It is true that the CITE element has to be a descendant of a block-level element, but I didn't want to include this in the example, to avoid cluttering it. Usually, I would place each CITE within an LI of an OL or UL, depending on the type of reference used.
oddz — 2008-10-06T12:39:35-04:00 — #18
Autistic Cuckoo wrote:
Hierarchy? How so? They denote semantic emphasis, that's all.
Contrast leads to hierarchy and emphasis is a form of contrast.
autisticcuckoo — 2008-10-06T13:16:00-04:00 — #19
How does contrast lead to hierarchy?
logic_earth — 2008-10-06T14:24:19-04:00 — #20
A hierarchy (in Greek: Ἱεραρχία, derived from ἱερός — hieros, 'sacred', and ἄρχω — arkho, 'rule') is a system of ranking and organizing things or people, where each element of the system (except for the top element) is a subordinate to a single other element.
emphasis does not create a hierarchy what it does is gives more weight to a word or parse.
Headers and list create a hierarchy.
next page →