Hi - is there css code for bold red text?
I’d like <strong red>text</strong>
NOT <strong class=“red”>text</strong>
thanks! - Val
Hi - is there css code for bold red text?
I’d like <strong red>text</strong>
NOT <strong class=“red”>text</strong>
thanks! - Val
Nope, you can either do
<style type="text/css">
span.bold-red {
color: red;
font-weight: bold;
}
</style>
<span class="bold-red">Some text</span>
or
<strong style="color: red;">Some text</strong>
Although I agree <strong red> would be nice
That’s not valid HTML, you can use tags with propertys (<strong class=“”) and so on.
It’s best to use semantic markup.While <strong> is specifically used to give emphasis to text, you should be using a <p> tag for this.
If you wish to make it bold and red you can do this.
<p class=”treeHugger”>Text</p>
And the CSS for this
p.treeHugger
{
color:red;
font-weight:bold /*You can do 700 or 800 or 900 instead of bold so that way you can pick your boldness level*/
}
If you are marking up a paragraph, use the p tag for the job. Also, keep all ‘presentational’ names out of the markup.
You could do something like this:
<p class="swimmers">...</p>
.swimmers {
color: red;
font-weight: bold;
}
Basically, the paragraph is conveying a relationship to the content within, which in this case is swimmers.
Hi - no it’s not a paragraph, occasionally in the middle of sentences I need bold red text, e.g. “Free Shipping [that’s bold red] in continental USA”
Guess I’ll stick to strong, span I use for yellow highlight, don’t want to confuse my pb (peabrain)
thanks! - Val
Remember the strong tag is to strongly emphasize text. If this is not what you are trying to convey with the strong tag, then a span would be most appropriate.
You can always redefine the strong in the css
strong {
color: red;
}
or you can redefine strong for certain divs
.content strong {
color: red;
}
<div class="content">
<p>this is <strong>emphasized red</strong></p>
</div>
<p>this is <strong>emphasized not red</strong></p>
Or you could style certain strongs this way.
strong.test{color:red;}
…?
What are you trying to say copycat :).
I think poprock is automated… said the exact same as I did in another thread.