wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Web Design Advanced HTML CSS

Total questions: 18

Worksheet time: 9mins

Name
Class
Date
1.

Which of the following is the proper way to apply the CSS code inside style.css to the home.html file?

a)

Inside home.html:


<head>

<link rel="stylesheet" type="text/css" href="style.css">

</head>

b)

Inside home.html:


<head>

<style href="style.css"></style>

</head>

c)

Inside style.css:


<html href="home.html">

d)

Inside style.css:


applyTo {

href: home.html;

}

2.

Which of the following is the proper way to link to the about.html page from the index.html page?

a)

<a href="about">About This Site</a>

b)

<a href="/about.html">About This Site</a>

c)

<a href="about.html">About This Site</a>

d)

<a href="/about">About This Site</a>

3.

What are IFrames?

a)

Buttons that link to other websites

b)

Videos uploaded to your website

c)

The number of views your website has

d)

HTML pages embedded inside of other HTML pages

4.

True or False: It is possible to embed any website inside IFrames.

a)

True

b)

False

5.

What is the function of the div tag?

a)

To define a section of an HTML page

b)

To group a block of elements together to format them with CSS

c)

To efficiently apply the same style to several different elements

d)

All of the above

6.

Which of the following correctly uses div to style multiple elements the same way?

a)

<div class="intro">

<h2>Welcome</h2>

<p>Hi, welcome to my page.</p>

</div>

b)

<div>

<h2 class="intro">Welcome</h2>

<p class="intro">Hi, welcome to my page.</p>

</div>

c)

<div>

.intro{

font-size: 16px;

font-style: italic;

}

<h2>Welcome</h2>

<p>Hi, welcome to my page.</p>

</div>

d)

<h2 div class="intro">Welcome</h2>

<p div class="intro">Hi, welcome to my page.</p>

7.

What is the difference between <span> and <div>?

a)

<span> is better for styling text, while <div> is better for styling images

b)

<span> is for styling multiple elements, while <div> is for styling single elements at a time

c)

<span> is used to group and style inline elements, while <div> creates a line break

d)

<span> is used to style elements, while <div> is used to embed parts of other websites

8.

Which of the following selects all p tags with the class alert and makes them red?

a)

p.alert {

color: red;

}

b)

p {

.alert {

color:red;

}

}

c)

.alert p{

color: red;

}

d)

p alert{

color: red;

}

9.

How can I select all h1 tags that are immediate children of div tags?

a)

div h1 {

...

}

b)

div > h1 {

...

}

c)

div {

h1 {

...

}

}

d)

.h1 div {

...

}

10.

What is the reasoning behind the Don’t Repeat Yourself principle?

a)

It helps you stay under the HTML file character limit

b)

Repeated code makes it harder to read and edit

c)

HTML files with repeated code will take a very long time to load

d)

It makes a more clean and organized website for the user

11.

What are some ways to cut down on repetitive code in your website?

a)

Group together multiple selectors with commas

b)

Strategically plan ahead to make sure the site is coded concisely

c)

Use a div to style multiple elements

d)

All of the above

12.

Which of the following will turn the h1 tag blue as the mouse hovers over it?

a)

hover > h1 {

color: blue;

}

b)

h1:hover {

color: blue;

}

c)

h1; hover {

color: blue;

}

d)

h1, hover {

color: blue;

}

13.

Which of the following will insert an exclamation point after every h2 element?

a)

h2:after {

content: “!”;

}

b)

h2:after {

content: !;

}

c)

h2::after {

content: “!”;

}

d)

h2::after {

content: !;

}

14.

True or False: If a selector’s display property is set to none, selected elements will still take up space on the page.

a)

True

b)

False

15.

Which of the following is not a property that can hide the visibility of an element?

a)

opacity

b)

hidden

c)

visibility

d)

display

16.

True or False: You will learn everything there is to know about HTML and CSS from CodeHS.

a)

True

b)

False

17.

Who might need to look something up in HTML/CSS documentation?

a)

A student learning about web development

b)

A web developer using a new feature

c)

A person building a personal website as a hobby

d)

All of the above!

18.

The Inspector would be a useful tool for which of the following tasks?

a)

Starting to write the HTML and CSS based on a design

b)

Testing what small CSS changes will do to the site presentation

c)

Finalizing changes made to the styling of the website

d)

All of the above