PapiP
PapiP

Reputation: 47

Is it possible to change the font color and font weight in HTML

So I am doing an assignment and I ran into a problem. I am supposed to change the paragraph font to dark orange and the font weight to 900. Keep in mind this is supposed to be done in HTML, not css. Is this even possible because It only lets me make the font orange not dark orange, and it doesn't let me change the weight.

My code:

<p style="color: dark orange" "font-weight: 900">Hello my name is Charles.</p>

Upvotes: 3

Views: 7097

Answers (2)

Thamilhan
Thamilhan

Reputation: 13323

It should be:

<p style="color: darkorange;font-weight: 900;">Hello my name is Charles.</p>

  1. No spaces allowed in color attribute
  2. Styles should be added with ; separation

Update 1: From the question comments

You are using CSS as inline style. There are three ways to insert CSS, Inline, Internal, External. This article helps!

Upvotes: 6

davidhu
davidhu

Reputation: 10472

<p style="color: DarkOrange; font-weight: 900">Hello my name is Charles.</p>

Of course, if you want a very specific color, you can use Hex codes

<p style="color: #d1a00e; font-weight: 900">Hello my name is Charles.</p>

Upvotes: 2

Related Questions