Q1 of 3outlined_flagWhich of the following style should be used to style the below element?<h1> I'm Styled </h1> style={{color: "Blue"; font-family:"Arial"}}style={{color: "Blue font-family:Arial"}}style={{color: "Blue", fontFamily:"Arial"}}style={{color: "Blue", FontFamily:"Arial"}}
Question
Q1 of 3outlined_flagWhich of the following style should be used to style the below element?<h1> I'm Styled </h1> style={{color: "Blue"; font-family:"Arial"}}style={{color: "Blue font-family:Arial"}}style={{color: "Blue", fontFamily:"Arial"}}style={{color: "Blue", FontFamily:"Arial"}}
Solution
The correct style to use would be:
style={{color: "Blue", fontFamily:"Arial"}}
This is because in JavaScript Object Notation (JSON), properties are separated by commas. Also, the property names are case sensitive, so 'fontFamily' is correct, not 'FontFamily'.
Similar Questions
How do you apply a style to all <h1> elements in CSS?0.5 Marksh1 {}#h1 {}all.h1 {}.h1 {}
We want to apply different styles to the 3 different <h1>'s on this page. What selectors should we use?CHOOSE ALL OF THE ANSWERS THAT WILL WORK.<body> <header> <h1>I am a heading</h1> </header> <h1>I am a heading too</h1> <main> <section> <h1>A third heading on the same page</h1> </section> </main></body> body>h1 { ... }header>h1 { ... }section>h1 { ... } header h1 { ... }header+h1 { ... }main h1 { ... } body h1 { ... }header>h1 { ... }section>h1 { ... } body+h1 { ... }header>h1 { ... }section>h1 { ... } body h1 { ... }header>h1 { ... }main>h1 { ... }
Is following CSS syntax valid?body { color: #FF0000;}h1.title { font-size: 16px;}
Is following CSS syntax valid?body { color: #FF0000;}h3,div.full_text,div.small_text h4,div.filters p.title { font-size: 20px;}
How would you convert the following CSS ruleset to an inline style?p { color: red;}
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.