Practice Questions Flashcards

1
Q

What is the characteristic of a web page with responsive design?

A) A measure of the page close speed
B) The ability to react to user events
C) The ability to resize to the screen size
D) A measure of the page load speed

A

The ability to resize to the screen size

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which language provides dynamic content for a webpage across all browsers?

A) XML
B) HTML5
C) JavaScript
D) XHTML

A

JavaScript

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which type of content should use an <aside>?

A) Site copyrights
B) Navigation menus
C) News feeds
D) Headlines

A

News feeds

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which element should a developer use for a bulleted list?

A) <dl>
B) <ul>
C) <ol>
D) <p>

A

<ul>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does an HTML5 code validator confirm about code?

A) It follows best practices
B) It complies with a standard
C) It works in every browser
D) It contains no warnings

A

It complies with a standard

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A web developer needs to play an audio file endlessly.

The developer writes the following HTML code:

<audio>
<source src = “media/audio.ogg” type=”audio/ogg” />
</audio>

Which attribute should this developer use?

A) controls
B) autoplay
C) loop
D) src

A

loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which attribute is used to display an image inside a <video> element before the video starts playing?

A) src
B) poster
C) type
D) img

A

poster

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which style rule correctly defines the 2em Arial font for all level two heading elements?

A) h2 {
font-family-: Arial ; font-weight: 2em; }
B) .h2 {
font-name: Arial; font-size: 2em; }
C) h2 {
font-family: Arial; font-size: 2em; }
D) .h2 {
font-name: Arial; font-weight: 2em; }

A

h2 {
font-family: Arial; font-size: 2em; }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Given the following CSS code:

body {
color: white;
}

Which part of an element is affected by the color property?

A) Border
B) Background
C) Text
D) Shadow

A

Text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What should be added first when embedding CSS in a single web page as an internal style sheet?

A) Declarations within a <style> </style> block
B) Declarations within a <head> block
C) A <head> element to the <style> section
D) A <style> element to the <head> section

A

A <style> element to the <head> section

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the first character a developer should use for an id selector in CSS?

A) ;
B) #
C) :
D) .

A

#

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A developer has an image that needs to remain in the same place when the page is scrolled.

Which CSS positioning scheme should this developer use?

A) Relative
B) Static
C) Absolute
D) Fixed

A

Fixed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A developer needs two pixels of space on the left side of content relative to the border.

Which CSS property should this developer use?

A) margin-left:2px;
B) float:left;
C) border:2px;
D) padding-left:2px;

A

padding-left:2px;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A web designer reviews the following style rule:

#brand {
font-weight: bold;
}

Which paragraph element will it select?

A) <p class=”brand”>Web Design</p>
B) <p id=”brand”>Web Design</p>
C) <p style=”brand”>Web Design</p>
D) <p id=”#brand”>Web Design</p>

A

<p id=”brand”>Web Design</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which CSS selector defines an element with a “class” attribute equal to “subject”?

A) ::subject
B) #subject
C) @subject
D) .subject

A

.subject

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What immediately encloses the padding in the CSS box model?

A) Border
B) Content
C) Margin
D) Table

A

Border

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the outermost box of the CSS box model?

A) Border
B) Content
C) Padding
D) Margin

A

Margin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Which markup positions an image so that the lower part of it is even with the lower part of the adjoining text?

A) <img src=”sample.jpg” text-align=”bottom”>
B) <img src=”sample.jpg” margin=”bottom”>
C) <img src=”sample.jpg” vertical-align=”baseline”>
D) <img src=”sample.jpg” padding=”baseline”>

A

<img src=”sample.jpg” vertical-align=”baseline”>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Which syntax for a CSS class floats images to the right?

A) .float {
floatright: right;
margin: 7px;
}

B) .floatright {
float: right;
margin: 7px;
}

C) .float <
float; right;
margin: 7px;
>
D) .floatright <
float: right;
margin: 7px;
>

A

.floatright {
float: right;
margin: 7px;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Which CSS transition should be used on an image to make it ease in when a user’s mouse hovers over that image?

A) transition-property
B) transition-timing-function
C) transition-duration
D) transition-delay

A

transition-timing-function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Which CSS property should a developer use to specify the bottom of a 3D element?

A) transform-style
B) perspective
C) perspective-origin
D) transform

A

perspective-origin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

texteffect {

A web designer creates the following animation by using CSS3:

position: relative;
animation-name: scroll;
animation-duration: 5s;
animation-timing-function: linear;
animation-play-state: running;
}
@keyframes scroll {
from {left: 0-px;}
to {left: 200px;}
}

How does the content of the element move when the page loads?

A) From left to right, repeating for as long as the page displays
B) From left to right one time
C) From top to bottom, repeating for as long as the page displays
D) From top to bottom one time

A

From left to right one time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

A web page includes the following CSS code:

@keyframes anim_01 {
0% {left: 0px; top: 0px;}
50% {left: 200px; top: 0px}
100% {left: 600px ;top: 0px;}
}
#animation {
position:relative;
animation-name: anim_01;
animation-duration: 4s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-play-state: running;
}

How often does the animation play when it is invoked?

A) Forever
B) Two times
C) Once
D) Four times

A

Forever

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Given the following CSS code:

div
{
transition-property: opacity, left, top, height;
transition-duration: 5s;
transition-delay: 3s
{

Which value determines how long the transition will last?

A) 0 seconds
B) 1 second
C) 3 seconds
D) 5 seconds

A

5 seconds

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Given the following CSS code: .box { width: 150px; height 150px; background: red; margin-top: 20px; margin-left: auto; margin-right: auto; -webkit-transition: background-color 2s ease-out; -moz-transition: background-color 2s ease-out; -o-transition: background-color 2s ease-out; transition: background-color 2s ease-out; } .box:hover { background-color: green; cursor: pointer; } Which color does this box turn when a user hovers a mouse pointer over it? A) Red with a time delay of two seconds B) Green with a time delay of two seconds C) Green with a time duration of two seconds D) Red with a time duration of two seconds
Green with a time duration of two seconds
26
A webpage has a section that contains an \ element. The element is always 10 pixels from the right and 50 pixels from the top of the browser. Which type of layout positioning does the \ element use? A) Absolute B) Fixed C) Static D) Relative
Fixed
27
Which "background-size" property value scales the background image to the greatest height and width that fits within the specified content area? A) length B) contain C) cover D) percentage
contain
28
The "background-origin" property has a value named "padding-box". Which corner of the padding edge does the "padding-box" value set the background relative to? A) Upper right B) Upper left C) Lower right D) Lower left
Upper left
29
Which tag enables developers to include dynamic code in an HTML document? A) \
Which statement should a developer add to the 'dragOver' function to allow the image to be dragged and dropped onto the 'section' element? A) event.cancelBubble = true; B) event.preventDefault(); C) event.type = "acknowledge"; D) event.stopPropagation();
event.preventDefault();
50
Which line of code should a developer use to create an interface that can retrieve data in a client browser? A) new XMLHttpRequest(); B) \ C) \ D) new { "AjaxObject":"xml" }
new XMLHttpRequest();
51
Given the following HTML code: \
    \
  • One\
  • \
  • Two\
  • \
Which jQuery code segment inserts an item at the beginning of the list? A) $("ul").before("\
  • Zero\
  • "); B) $("ul".prepend("\
  • Zero\
  • "); C) $("ul > li").after("\
  • Zero\
  • "); D) $("ul > li").append("\
  • Zero\
  • ");
    $("ul").prepend("\
  • Zero\
  • ");
    52
    Which HTML tag provides ways for users to enter information on forms? A) \