wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Quiz-2 Sec-E

Total questions: 51

Worksheet time: 38mins

Name
Class
Date
1.

Which of the following selectors selects any tag with an id attribute set?

a)

E#id

b)

.class

c)

#id

d)

*

2.

What will be the output of below mentioned code snippet?

p strong {background-color: yellow;}

a)

Strong have yellow background

b)

Strong element within a p element have a yellow background

c)

Both p and strong have yellow background

d)

None of the mentioned

3.

The _____________ attribute is used to define the name(s) of the class(es) to which a particular tag belongs.

a)

class

b)

elelment

c)

id

d)

none of the choices

4.

By applying an ___________ a style can be applied to just a single tag.

a)

class rule

b)

element rule

c)

id rule

d)

none of the choices

5.

What type of selector is used in this case?

p {line-height: 150%;}

a)

class selector

b)

element selector

c)

id selector

d)

none of the choices

6.

How many different types of selectors in CSS?

a)

3

b)

4

c)

5

d)

6

7.

An id is NOT always unique within the page so it is chosen to select a single, unique element.

a)

True

b)

False

8.

The universal selector is used as a ?

a)

Wildcard Character

b)

Page Character

c)

Commas character

d)

None of the above

9.

___________ are used to separate each selector in grouping.

a)

#

b)

.

c)

;

d)

,

10.

A ___________ is used to define a special state of an element.

a)

pseudo-tag

b)

pseudo-element

c)

pseudo-id

d)

pseudo-class

11.
Select the code below that uses CSS to configure a background color of #000000 for a web page.
a)
body { background-color: #000000; }
b)
body { bgcolor: #000000; }
c)
document { background­-page: #000000; }
d)
None of these
12.
What unit of measurement does CSS use for size?
a)
px
b)
em
c)
%
d)
All work
13.
Which is the correct way to format a Font Family for a paragraph? (Hint: make sure you have more than one backup font!)
a)
p { font-face: Arial, Verdana, San-Serif; }
b)
p { font-family: Arial, Verdana, San-Serif; }
c)
p { family-font: Arial, Verdana, San-Serif; }
d)
p { font: Arial, Verdana, San-Serif; }
14.

Which rule set would change the font size to 24?

a)

font-size: 24

b)

size: 24;

c)

font-size: 24;

d)

font size: 24;

15.

Which CSS selector applies to the yellow element(s) only? Select the correct answers!

a)

li a{ ... }

b)

li.a{ ... }

c)

li, a{ ... }

d)

li-a{ ...}

e)

none of the above

16.

Which color value in CSS gives a transparency effect?

a)

Color Names

b)

Hex Codes

c)

RGB

d)

RGBA

17.

What will this rule set create?


h1 {

text-decoration: underline overline dotted red;

}

a)

red waves under the heading

b)

red dots over and under the heading

c)

red waves over and under the heading

d)

red dots over the heading

18.
Which line of code correctly places a gif image named "tiger" into a webpage?
a)
<img src="tiger" alt="BengalTiger" />
b)
<img gif=tiger alt="BengalTiger">
c)
<image source="tiger.gif" alt=BengalTiger" />
d)
<img src="tiger.gif" alt="BengalTiger" />
19.

A __________ is a protection for any published work that helps to prevent that work from being used without prior authorization.

a)

Firewall

b)

HTML

c)

Copyright

d)

CSS Declaration

20.

____________ is a term used to describe how page elements are placed on the screen. For example, elements can be positioned left, right, or center.

a)

Attribute

b)

Style

c)

Alignment

d)

Properties

21.

is an inline element used to create a single line break in a document.

a)

<b> tag

b)

<tr> tag

c)

<br> tag

d)

<ol> tag

22.

an _____ _____ stays in the same line as the code that surrounds the text.

a)

block element

b)

inline element

c)

HTML tags

d)

alt attribute

23.

a _____ _____ is any element that starts a new line (e.g., paragraph) and uses the full width of the page or container.

a)

inline element

b)

img href

c)

CSS ID

d)

block element

24.
Which of these lines has a negative gradient?
a)
The orange one
b)
The red one
c)
The blue one
d)
The green one
25.
What is the y-intercept of this line?
a)
2
b)
3
c)
-3y
d)
-3
26.

What gradient is represented here

a)

negative

b)

zero

c)

undefined

d)

positive

27.

What gradient is represented here

a)

Positive

b)

negative

c)

undefined

d)

zero

28.

What is the gradient of this line

a)

4

b)

4/5

c)

-2

d)

-1/2

29.
The gradient of horizontal line is .........
a)
Always zero
b)
undefined
c)
Always positive 
d)
Always negative
30.

Find the gradient of the line.

a)

Undefined

b)

0

c)

1

d)

-1

31.
Find the slope of the line.
a)
Undefined
b)
0
c)
1/1
d)
-1/1
32.

Which of the straight line give the gradient in positive?

a)
b)
c)
d)
33.

Find the gradient.

a)

64\frac{6}{4}

b)

46-\frac{4}{6}

c)

32-\frac{3}{2}

d)

23-\frac{2}{3}

34.

What is the definition of Gradient of a Line?

a)

It is the measure of degrees of a line.

b)

It is the measure of length of a line.

c)

It is the measure of steepness of a line.

d)

It is the measure of strength of a line.

35.

What is the gradient of the line parallel to the x-axis

a)

0

b)

undefined

c)

+1

d)

-1

36.

The CSS box-sizing property allows us to include the padding and border in an element's total width and height?

a)

False

b)

True

37.

What does CSS Box-Size do?

a)

include the padding and border in an element's total width and height

b)

Increase size

c)

None of the above

38.

How Can We Write Multiple CSS Gradients?

a)

The Text is shown normal.

b)

background-image: linear-gradient(to right, red,orange,yellow,green,blue,indigo,violet);

c)

None of the above

39.

inline-block, the top and bottom margins/paddings are respected, but with ___________?

a)

The Text is shown normal.

b)

Display

c)

None of the above

40.

HTML - semantic tag needed to complete this -

<_______>

<a href="index.html"> Home</a>

<a href="page2.html">Page 2</a>

<a href="page3.html">Page 3</a>

<________>

a)

<nav>

</nav>

b)

<article>

</article>

c)

<aside>

</aside>

d)

<footer>

</footer>

41.

HTML Tables -

you want a cell to be super long...fit over the TOP of two other cells in another row

(like cell A in the image)

a)

rowspan

b)

colspan

c)

cellspan

42.

HTML - two semantic tags that create collapsible content

a)

<header>

<footer>

b)

<details>

<summary>

c)

<nav>

<footer>

d)

<aside>

<article>

43.

Q. 

Identify the CSS Selector Below

h1 {......}

answer choices

ID Selector

Class Selector

Element Selector

Grouping Selector

Multiple-choice

Add question

Q. 

Identify the CSS Selector Below

p.crown {......}

answer choices

Element AND Class Selector

Descendant Selector

Element Selector

Grouping Selector

Multiple-choice

Add question

Q. 

Identify the CSS Selector Below

h1, h2 {......}

answer choices

ID Selector

Class Selector

Element Selector

Grouping Selector

Multiple-choice

Add question

Q. 

Identify the CSS Selector Below

p .crown {......}

answer choices

Element AND Class Selector

Descendant Selector

Element Selector

Grouping Selector

Multiple-choice

Add question

Q. 

Which is an example of an CSS Element Selector?

answer choices

#title

.title

h1

h1.title

Multiple-choice

Add question

Q. 

Identify the CSS Selector Below

.crown {......}

answer choices

ID Selector

Class Selector

Element Selector

Grouping Selector

Multiple-choice

Add question

Q. 

Identify the CSS Selector Below

table .crown {......}

answer choices

Element AND Class Selector

Descendant Selector

Element Selector

Grouping Selector

Multiple-choice

Add question

Q. 

Identify the CSS Selector Below

#crown {......}

answer choices

ID Selector

Class Selector

Element Selector

Grouping Selector

Multiple-choice

Add question

Q. 

Which is an example of an CSS Descendant Selector?

answer choices

table

h1, h2

p .title

p

Which is an example of an CSS Element AND Class Selector?

answer choices

#title

.title

h1

h1.title

a)

ID Selector

b)

Class Selector

c)

Element Selector

d)

Grouping Selector

44.

Identify the CSS Selector Below

p.crown {......}

a)

Element AND Class Selector

b)

Descendant Selector

c)

Element Selector

d)

Grouping Selector

45.

Identify the CSS Selector Below

h1, h2 {......}

a)

ID Selector

b)

Class Selector

c)

Element Selector

d)

Grouping Selector

46.

Identify the CSS Selector Below

p .crown {......}

a)

Descendant Selector

b)

Element AND Class Selector

c)

Element Selector

d)

Grouping Selector

47.

Which is an example of an CSS Element Selector?

a)

#title

b)

.title

c)

h1.title

d)

h1

48.

Identify the CSS Selector Below

.crown {......}

a)

ID Selector

b)

Class Selector

c)

Element Selector

d)

Grouping Selector

49.

Identify the CSS Selector Below

table .crown {......}

a)

Element AND Class Selector

b)

Descendant Selector

c)

Element Selector

d)

Grouping Selector

50.

Identify the CSS Selector Below

a)

ID Selector

b)

Class Selector

c)

Element Selector

d)

Grouping Selector

51.

Which is an example of an CSS Element AND Class Selector?

a)

#title

b)

.title

c)

h1

d)

h1.title