0

Just a small problem, basically, the font styles I have set for these specific IDs are not working, and are being shown in the browser as the preset font for the page, here's the CSS code:

#para { font: #F00; } 

Here is the JavaScript code:

document.getElementById("para").innerHTML="As you can see, the answer is"; 

I have placed the id into a paragraph tag in my HTML file, but the font styling isn't working

1 Answer 1

2

To style the font color is to use the color property:

#para { color: #F00; } 

See this for more info: https://developer.mozilla.org/en-US/docs/CSS/font

Sign up to request clarification or add additional context in comments.

1 Comment

It happens, sometimes I feel like font-color would've been more intuitive.... there's already font-family, font-weight, font-style.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.