Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can CSS override the bold style of an existing <b> bold tag?

I have a script that has a breadcrumb styled outside of my reach (core files), and I want to override all its styling using CSS. The text looks like this:

<div class="someclass">
<b>Some Text</b>
</div>

I want to style the <div> to make it ignore the bold tag. Is this possible without removing the <b> tag and just using external CSS?

like image 587
Adrian M. Avatar asked Apr 24 '11 16:04

Adrian M.


People also ask

How do I change the bold font in CSS?

To bold the text in HTML, use either the strong tag or the b (bold) tag. Browsers will bold the text inside both of these tags the same, but the strong tag indicates that the text is of particular importance or urgency. You can also bold text with the CSS font-weight property set to “bold.”

How do you make text bold other than B tags?

Another alternative to b is the em element, which in HTML 5.2 "represents stress emphasis of its contents". Note that this element is usually rendered in italics (and has therefore often been recommended as a replacement for the i element).

Which tag we can use instead of bold tag?

This was formerly known as the Boldface element, and most browsers still draw the text in boldface. However, you should not use <b> for styling text; instead, you should use the CSS font-weight property to create boldface text, or the <strong> element to indicate that text is of special importance.


1 Answers

Yes:

.someClass b {
    font-weight: normal;
}
like image 81
SLaks Avatar answered Oct 19 '22 03:10

SLaks