Practice Questions Flashcards
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
The ability to resize to the screen size
Which language provides dynamic content for a webpage across all browsers?
A) XML
B) HTML5
C) JavaScript
D) XHTML
JavaScript
Which type of content should use an <aside>?
A) Site copyrights
B) Navigation menus
C) News feeds
D) Headlines
News feeds
Which element should a developer use for a bulleted list?
A) <dl>
B) <ul>
C) <ol>
D) <p>
<ul>
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
It complies with a standard
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
loop
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
poster
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; }
h2 {
font-family: Arial; font-size: 2em; }
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
Text
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 <style> element to the <head> section
What is the first character a developer should use for an id selector in CSS?
A) ;
B) #
C) :
D) .
#
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
Fixed
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;
padding-left:2px;
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>
<p id=”brand”>Web Design</p>
Which CSS selector defines an element with a “class” attribute equal to “subject”?
A) ::subject
B) #subject
C) @subject
D) .subject
.subject
What immediately encloses the padding in the CSS box model?
A) Border
B) Content
C) Margin
D) Table
Border
What is the outermost box of the CSS box model?
A) Border
B) Content
C) Padding
D) Margin
Margin
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”>
<img src=”sample.jpg” vertical-align=”baseline”>
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;
>
.floatright {
float: right;
margin: 7px;
}
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
transition-timing-function
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
perspective-origin
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
From left to right one time
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
Forever
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
5 seconds
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
A webpage has a section that contains an <aside> 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 <aside> element use?
A) Absolute
B) Fixed
C) Static
D) Relative
Fixed
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
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