HTML & CSS
How to add ...
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
How to add a background color for all items <h1>?
all.h1 {background-color:#FFFFFF;}
h1.all {background-color:#FFFFFF;}
h1 * {background-color:#FFFFFF;}
h1 {background-color: #FFFFFF;}
$$("h1").each(function(h1) { h1.style['background-color']="#FFFFFF"; });
h1 {background-color: #FFF;}
h1 {background-color: white;}
Explanation
The most simple way is
to use type selector h1.
background
css
html
h1
color
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
Related Content
Which CSS property is used to set the background color?...
How to create a white, translucent element background?...
How do I set the background color for the h1 header?...
Which background will be visible in the div box if the following html markup...
How to set a gray background for the first and third rows o...
H
TML & CSS
Quiz
Login to learn HTML & CSS
or
Read more about
HTML & CSS Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Keep exploring
HTML & CSS quizzes
How to make a shadow for text in gray?...
Which of the following is true about the pseudo-class ...
What is the difference between pseudo-elements :after and ...
What is the font-variant property for?...
Which color will word "text" has? <style> p{ ...
How to change the color of a link to blue when the cursor moves over i...
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment