JoshuaBrand
JoshuaBrand

Reputation: 177

Remove all formatting from text

Is there anyway to remove all formatting from text within a certain class?

for example i have text brought from a database and displayed like so -

<p class="text">
Blah BLAH blah
</p>

<p>
blah **BLAH** blah
<p>

I need it so the same text can be shown twice but only one with the formatting that it is saved with. Any ideas?

Upvotes: 1

Views: 166

Answers (2)

Ed_
Ed_

Reputation: 1117

You can either use a custom class(with no formats) or use inline formatting that has the highest priority:

<p class="noFormat">
...
</p>


or 
<!-- inline -->
<p style="font-size: , font-family: , font-weight: , margin: , padding: , text-align: ">
...
</p>

Upvotes: 1

Sudheer
Sudheer

Reputation: 2986

remove formatting? dont think you can remove styles.If you have to remove define a new class and override them.

<p class="text">
Blah BLAH blah
</p>

<p class="noFormatting">
blah **BLAH** blah
<p>.

.noFormatting{
 font-style:normal;
 font-weight:normal;/* any other properties you want to ovveride! */

}

Upvotes: 1

Related Questions