April 21st, 2003, 07:17 PM
simple css question
scenario: i applied some styles to the p (paragraph) tag, so text in a paragraph is a certain color and size and whatever. however when i attempt to put a word within the bold tag (<b>), nothing happens, the text i want to be bold is unaffected (its not bold like i want it to be). do you have to use a work around when it comes to making text bold in css? thanksNadvance
April 21st, 2003, 08:43 PM
Well, since you're using CSS, you should't be using the <b> tag anyway b/c it's a formatting/style tag. Instead, use a <span> tag and apply a class to it and add that class to your stylesheet. That way, in the future, if you no longer want the words bold, but maybe italic instead, you can change just the stylesheet. After all, that is the advantage.
<p>This is some a <span class="keyword">keyword</span>, which is bold!</p>
April 22nd, 2003, 01:47 AM
actually i never heard of the span tag, is it a generic tag meant to be applied to miscelaneous styles?
April 22nd, 2003, 02:38 PM
It's an inline tag whereas <p> is a block tag.
April 22nd, 2003, 03:37 PM
<span> is a tag that's meant only for carrying style information; it has no effect on its own. When you stick a style into a <div> tag, for example, you get the style information and the extra line break from <div>'s normal function. <span> doesn't have a normal function like that, so you can use it without it changing anything else.