Can You Make The H2 Tag Unbolded?

redrubies

Supreme Member
Joined
Jan 17, 2011
Messages
1,442
Reaction score
2,664
I have an h2 tag that looks stupid bolded. Is there any way to unbold it? Nothing I am doing is working. Thanks!
 
Yes, you can do this with css:

Code:
h2 { font-weight: normal; }

or inline:

Code:
<h2 style="font-weight: normal;">My Stuff Here</h2>
 
If that doesn't work, use:

Code:
h2 { font-weight: normal!important; }
 
Yes, you can do this with css:

Code:
h2 { font-weight: normal; }

or inline:

Code:
<h2 style="font-weight: normal;">My Stuff Here</h2>

Thank you, thank you, thank you!
 
Also if it is inline, you can do something like this:

<h2 style="font-size: 12pt; font-weight: none;">text goes here</h2>
 
Good call Namun - using !important is very handy sometimes. For the OP: !important makes it so that the attribute overrides all other CSS. Of course, using !important is kind of bad practice - it usually implies that your code is poorly organized and that you have overlapping CSS rules. CSS should inherit - not overlap.

And in my experience, when people start using !important, they start using it everwhere... which gets even messier.

Just fyi: if you have more than one !important effecting the same attribute, the first one overrides the later ones (so the order in which your css is included/interpreted matters).
 
Good call Namun - using !important is very handy sometimes. For the OP: !important makes it so that the attribute overrides all other CSS. Of course, using !important is kind of bad practice - it usually implies that your code is poorly organized and that you have overlapping CSS rules. CSS should inherit - not overlap.

And in my experience, when people start using !important, they start using it everwhere... which gets even messier.

Just fyi: if you have more than one !important effecting the same attribute, the first one overrides the later ones (so the order in which your css is included/interpreted matters).

Your first inline code worked just great. I have been making my sites for over 10 years and would you believe that I never looked into how to unbold an h2 tag? I never had a need to because I always meant for what I wanted there to be bolded. But I wanted a delicate look for this site.
 
It's good practice when building websites to use what they call a "CSS reset" - it essentially takes all the default formatting out. It removes the sizes/font-weights from the H tags, it removes margins/paddings from p tags. It takes the bullets off of li tags and stuff like that. That way you can make a website that isn't dependent upon any of these defaults (especially since some browsers interpret these defaults differently).
 
It's good practice when building websites to use what they call a "CSS reset" - it essentially takes all the default formatting out. It removes the sizes/font-weights from the H tags, it removes margins/paddings from p tags. It takes the bullets off of li tags and stuff like that. That way you can make a website that isn't dependent upon any of these defaults (especially since some browsers interpret these defaults differently).

That's a good idea because I spend more time changing defaults. The defaults irritate me.
 
There are a number of good reset scripts to start from, anymore I tend to create sites using Twitter Bootstrap though there are a number of good examples listed at

hxxp stackoverflow [c*m] [slash] questions [slash] 116754 [slash] best-css-reset


my apologies for the mangled url -- a google search for "reset css" will also turn up some good boilerplates to use
 
Edit your style page if you have one and make sure there isn't a bold setting under the h2 part.
 
Back
Top