Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

removing bold styling from part of a header

Tags:

html

Is there a way to remove bold styling from part of a header?

<h1>**This text should be bold**, but this text should not</h1> 

Is there a way to accomplish this?

like image 741
Apollo Avatar asked Oct 06 '12 19:10

Apollo


People also ask

How do I remove the bold from a table header?

To make it not bold, override the font-weight in css to normal . Show activity on this post. I am using internal CSS for you, directly insert the font style inside your table. Copy and pasta this code into your project, it will do the job.

How do you remove the bold from a label tag?

So, add a class "form-check-label" into your tag, it will be not bold.

How do you remove bold style in HTML?

The easiest way would be to remove the <strong> tag from your HTML, but if you can't do that for some reason then just add font-weight:normal to that bit of the CSS.

How do I remove bold font?

Click Format > Font... Select Not Bold in the Font Style list. Click OK. Click Replace All.


2 Answers

You could wrap the not-bold text into a span and give the span the following properties:

.notbold{     font-weight:normal }​ 

and

<h1>**This text should be bold**, <span class='notbold'>but this text should not</span></h1> 

See: http://jsfiddle.net/MRcpa/1/

Use <span> when you want to change the style of elements without placing them in a new block-level element in the document.

like image 182
Sebass van Boxel Avatar answered Oct 09 '22 13:10

Sebass van Boxel


If you don't want a separate CSS file, you can use inline CSS:

<h1>This text should be bold, <span style="font-weight:normal">but this text should not</span></h1> 

However, as Madara's comment suggests, you might want to consider putting the unbolded part in a different header, depending on the use case involved.

like image 22
GreenMatt Avatar answered Oct 09 '22 13:10

GreenMatt