You are creating a header section for your web page. You add the following code to the page:<header> <h1>This is the header.</h1></header>You want the header background to be black. What style rule should you create?0 / 1 pointheader { background-color: #ffffff; }header { background-color: 000000; }header { background-color: #000000; }header { background-color: ffffff; }
Question
You are creating a header section for your web page. You add the following code to the page:<header> <h1>This is the header.</h1></header>You want the header background to be black. What style rule should you create?0 / 1 pointheader { background-color: #ffffff; }header { background-color: 000000; }header { background-color: #000000; }header { background-color: ffffff; }
Solution
The correct style rule to make the header background black is:
header { background-color: #000000; }
Similar Questions
You have created the following HTML code:<p>This is a sample paragraph.</p>You create a style rule to shade the background of the paragraph:p { background-color: blue; border-radius: 25px; color: white; }However, when you test the web page, you notice that the text appears very close to the edges of the shading. You want there to be more room between the text and the edges of the shading.What should you add to your style rule?1 pointpadding: 25px;margin: 25px;position: sticky;display: inline;
You really want to emphasize a headline on a web page. To do this, you would like to create text with two shadows. You want one shadow to be gray and the other shadow to be black. The gray shadow should have a vertical offset of 3px and a horizontal offset of 2px. The black shadow should have a vertical offset of 4px and a horizontal offset of 3px. The text is the content of a heading 1 element. The text color is blue. You are going to use the embedded style sheet.What should you add to the h1 style rule?1 pointbox-shadow: 2px 4px gray, 3px 3px;box-shadow: 2px 3px gray, 3px 4px;box-shadow: 2px 3px gray, 3px 4px black;box-shadow: 2px 4px gray, 3px 3px black;
Refer to the code snippet below:<head> <style> body { font-family: Arial; color: blue; } p { color: red; } .logo { font-family: Papyrus; color: green; } </style></head><body> <div id="header"> <span class="logo">Web Development</span> </div> <div id="body"> <p>This is the body of my page</p> </div></body>Which styles end up being applied to span and p elements?<span> - color: green, font-family: Papyrus<p> - color: red, font-family: Arial<span> - color: green, font-family: Arial<p> - color: red, font-family: Arial<span> - color: green, font-family: Arial<p> - color: red, font-family: Papyrus<span> - color: blue, font-family: Arial<p> - color: blue, font-family: Arial
Which of the following is NOT a valid CSS property?*2 pointsfont-sizebackground-colortext-colormargin-top
Write a JavaScript script that updates the text color of the <header> element to red (#FF0000):You must use document.querySelector to select the HTML tagYou can’t use the JQuery APIPlease test with this HTML file in your browser:guillaume@ubuntu:~/0x15$ cat 0-main.html <!DOCTYPE html><html lang="en"> <head> <title>Holberton School</title> </head> <body> <header> First HTML page </header> <footer> Holberton School - 2017 </footer> <script type="text/javascript" src="0-script.js"></script> </body></html>guillaume@ubuntu:~/0x15$
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.