WorksheetsWeb Design with HTML: CSS Styling
Total questions: 17
Worksheet time: 9mins
Which of the following HTML code snippets is the proper way to set the background color of an <h1> tag to be blue?
<blue> <h1>Hello</h1> </blue>
<h1 background-color="blue">Hello</h1>Windows
<h1 style="blue">Hello</h1>Twitter
<h1 style="background-color:blue;">Hello</h1>
Which of the following is a valid color in HTML?
“blue”
“rgb(255, 0, 0)”
“#00FF00”The list on a webpage
All of the aboveThe title of the webpage
All of the colors you see on a computer screen are the result of a mixture of the same three colors. What are those colors?
red, yellow, blue
green, orange, purple
red, green, blue
red, green, yellow
Which of the following is the proper format for an HTML tag?
>h1<Content Affected by Tag >/h1<
<h1>Content Affected by Tag<h1>
<h1 Content Affected by Tag />
<h1>Content Affected by Tag</h1>
Which of the following best describes the difference between the domain and path of a URL?
The domain specifies where the browser’s request should be sent.
The path specifies exactly what file is being requested.
The domain specifies what kind of file is being requested.
The path specifies the name of the file being requested.
The domain specifies the name of the file being requested.
The path specifies what kind of file is being requested.
The domain specifies exactly what file is being requested.
The path specifies where the browser’s request should be sent.
Which of the following classifies as metadata about a webpage?
The tags that make up the body of the webpage
The title of the webpage
A list on a webpage
A table on a webpage
An image is hosted at
https://upload.wikimedia.org/wikipedia/commons/6/62/Big_and_little_dog.jpg
Which of the following is the proper HTML code to display this image on your webpage?
What is the result of the following HTML code:
<ol> <li>Bread</li> <li>Milk</li> <li>Eggs</li> </ol>
* Bread
* Milk
* Eggs
– Bread
– Milk
– Eggs
1. Bread
2. Milk
3. Eggs
a. Bread
b. Milk
c. Eggs
Suppose you are making a music streaming website and you want to make a page that displays a user’s music library.
Which of the following is the proper HTML code to create the following table:
<table border="1"> <tr> <td>Title</td> <td>Artist</td> <td>Length</td> </tr> <tr> <td>CD Jam</td> <td>Rooney Pitchford</td> <td>3:55</td> </tr> <tr> <td>Memory</td> <td>Tom Misch</td> <td>5:41</td> </tr> </table>
<table border="1"> =<tr> <th>Title</th> <th>Artist</th> <th>Length</th> </tr> <tr> <td>CD Jam</td> <td>Rooney Pitchford</td> <td>3:55</td> </tr> <tr> <td>Memory</td> <td>Tom Misch</td> <td>5:41</td> </tr> </table>
<table border="1"> <tr> <th>Title</th> <th>CD Jam</th> <th>Memory</th> </tr> <tr> <td>Artist</td> <td>Rooney Pitchford</td> <td>Tom Misch</td> </tr> <tr> <td>Length</td> <td>3:55</td> <td>5:41</td> </tr> </table>
<table border="1">> <tr> <th>Title</th> <td>CD Jam</td> <td>Memory</td> </tr> <tr> <th>Artist</th> <td>Rooney Pitchford</td> <td>Tom Misch</td> </tr> <tr> <th>Length</th> <td>3:55</td> <td>5:41</td> </tr> </table>
Suppose you have written a web page using HTML and it is hosted at the URL yourdomain.com/home.html
Which of the following statements is true about which devices can view your website?
Any browser on any device will be able to view your webpage, because all browsers and devices on the Internet agree to use the same protocols for sending, receiving, and viewing webpages.
Only browsers on desktop computers can view your website because only desktop browsers can render HTML based web pages.
Only browsers on mobile phones can view your website because only mobile browsers can render HTML based web pages.
Only computers made after the day you publish your website can view your website. Older computers can’t understand HTML.
Why do we use CSS?
HTML wasn’t intended to be able to style web pages, CSS allows us to add style
Separate the content of a web page from the design of a web page
Easily modify the look and feel of a web site even at a large scale
All of the above
Which of the following is a valid CSS rule?
h1 { color: blue; }
style="color:blue;"
css="color:blue;"
h1 { color { blue; } }
Which of the following code snippets will select all <img> tags on a page and give them a height of 200 pixels?
tag="img" { height: 200px; }
<img style="height:200px;">
<img> { height: 200px; }
img { height: 200px; }
Which of the following code snippets will select all HTML elements with the class “alert” and set their color to be red?
alert { color: red; }
.alert { color: red; }
#alert { color: red; }
class="alert" { color: red; }
Which of the following CSS rules will select the HTML element with the id logo and set the font size for that element to 60 pixels?
logo { font-size: 60px; }
.logo { font-size: 60px; }
#logo { font-size: 60px; }
id="logo" { font-size: 60px; }
Which of the following code snippets will select all HTML elements with the class “alert” and set their color to be red?
alert { color: red; }
#alert { color: red; }
class="alert" { color: red; }
.alert { color: red; }
Which of the following CSS rules will select the HTML element with the id logo and set the font size for that element to 60 pixels?
logo { font-size: 60px; }
.logo { font-size: 60px; }
#logo { font-size: 60px; }
id="logo" { font-size: 60px; }
