Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I use 2 different styles in the same p?

<p>This is a bold red text</p>

<p color:red,font:bold>This is a bold red text</p>

I tried this way, but not working

How can i fix this prroblem?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You are using style incorrectly, let me show you.

Here are 2 variations on how you can do this.

#1

Correct Style:

<p style="color: red; font-weight: bold;">This is a bold red text </p>

#2

Or you can use classes.

HTML:

<p class="textformatting">This is a bold red text</p>

Style:

.textformatting{
color: red;
font-weight: bold;
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading