468,107 Members | 1,324 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,107 developers. It's quick & easy.

Question about a <b> in the inner text of a label

I have three radio buttons that are possible answers to a question. I
have put them in a table and there is a label that goes with each radio
button as its text. I would like to make some of the text of the label
bold, so I have put <b> tags around the text I want bold. But it
doesn't work; the text that should be bold is just regular. Any ideas
would be appreciated. Thanks in advance. Here is the html:

<table id="ANSWERS_4" border="0"
style="color:#003366;font-family:Arial;font-size:12pt;">
<tr>
<td>
<input id="ANSWERS_4_0" type="radio" value="A" />
<label for="ANSWERS_4_0"><b>This text is bold</b> 200 mg/dL</label>
</td>
</tr>
<tr>
<td>
<input id="ANSWERS_4_1" type="radio" value="B" />
<label for="ANSWERS_4_1">350 mg/dL</label>
</td>
</tr>
</table>

Jul 23 '05 #1
1 3933
jo********@yahoo.com wrote:
I have three radio buttons that are possible answers to a question.
The sample you posted has just two. It often happens that when people
post just an excerpt of code, they inadvertantly modify it in a manner
that prevents proper analysis of the problem, or omit a relevant part.
To put it simply: post the URL
I have put them in a table and there is a label that goes with each
radio button as its text.
OK, though I don't see a particular reason to use a table - you have
just one cell per row.
I would like to make some of the text of
the label bold, so I have put <b> tags around the text I want bold.
Why? The <b> markup says 'I'd like to have this bold, but I can't say
why'. If it is for emphasis, <strong> is more logical. Either way, no
problem - you can use text-level markup inside a label element.
But it doesn't work; the text that should be bold is just regular.
Your excerpt is displayed with the desired text in bold
on IE 6 and Mozilla on my system.

Please post the URL, and identify the browser(s) you tested.
<table id="ANSWERS_4" border="0"
style="color:#003366;font-family:Arial;font-size:12pt;">
Bad CSS: you should always set background when you set color, and
you should not set a fixed font size. The size 12pt is too big to many,
too small to many.
<input id="ANSWERS_4_0" type="radio" value="A" />


Your input elements lack the name attribute, without which they are
useless.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Donald Firesmith | last post: by
3 posts views Thread by z. f. | last post: by
reply views Thread by Adam | last post: by
2 posts views Thread by Magnus Blomberg | last post: by
8 posts views Thread by antonyliu2002 | last post: by
11 posts views Thread by Squeamizh | last post: by
3 posts views Thread by ajay2552 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.