1If you don't explicitly set a value for the position property of an element, what value will it have? a) No position values b) Position: absolute; c) Position: relative; d) Position: static;
d) position static
2How do elements behave in what we call the "normal (or natural flow of the document"? a. they stack top to bottom b. they flow left to right c. they flow left to right & top to bottom d. they overlap unless directed otherwise
c. they flow left to right & top to bottom
3Which position value leaves an element in the normal/natural flow of the document? a. static b. relative c. fixed d. absolute
a. static
4When you set position: relative; on an element, what is that element being positioned relative to? a. the four edges of the browser window b. wherever the element would end up in the normal flow of the document c. the next nearest element d. the next nearest block element
b. wherever the element would end up in the normal flow of the document
5When you set position: abolute; on an element, what is that element positioned in relation too? a. it's parent element b. the viewport c. the browser window d. the elements nearest neighbor
a. it's parent element
6Which of the following must also happen in order to absolute-ly position an element? a. the element must be a block-level element b. the element must be an inline element c. the element cannot have any child elements d. the elements parent element must also be given a position value
d. the elements parent element must also be given a position value
7What position value do you set on an element to position it relative to the four sides of the viewport? a. relative b. absolute c. fixed d. static
c. fixed
8When you apply a position value, what should you generally also provide to position the element where you want it? a. the elements offset values b. the elements height & width c. the elements priority in the cascade d. the elements z-index value
a. the elements offset values
9the z-index property controls which element will end up on top in the case of element overlap. - true - false
true
10which of the following can be used to create a nabber that stays in place on the page even when the user scrolls? a. position: absolute; b. display: visible: c. position: fixed; d. display: block;
c. position: fixed;
11What happens to an absolutely positioned element when when a user scrolls the web page? a. it stays in place no matter what the user does b. it scrolls along with it's parent element c. it disappears until the user stops scrolling d. it floats
b. it scrolls along with it's parent element
12HTML stands for
Hyper Test Markup Language
13Does spacing matter in an html document? a. no b. yes
a. no
14What do HTML elements use tags for? a. to structure content b. to make content noticeable c. to build content
a. to structure content
15HTML & CSS are a collection of ___ and ___ a. web standards b. graphic styles c. standard graphics d. web styles
a. web standards
16What is the correct HTML element for inserting a line break?
<br>
17CSS stands for. . .
Cascading Style Sheets
18Which of these is a CSS comment? a. / comment *// b. <* comment *> c. <!-- comment --> d. comment */
d. comment */
19What do CSS selectors allow you to do? a. to apply one style to the whole document b. to select the text you want c. to select the CSS d. to select & apply style to HTML elements
d. to select & apply style to HTML elements
20A CSS formatting rule consists of what two parts? a. selector & declaration b. the main and sub parts c. the redeclaration & selection
a. selector & declaration
21What does floating an element do to it? a. takes it out of the flow of the document b. makes it's position override all other elements positions c. makes it's position override the rest of it's CSS d. removes it's default width value
a. takes it out of the flow of the document
22What kinds of element can be floated? a. only block elements b. online inline elements c. all block elements and select inline elements d. all inline elements and select block elements
c. all block elements and select inline elements
23what happens to inline content that follows a floated element? a. it collides with the floated element, unless you fix it's position b. it ignores the floated element c. it flows around the floated elements d. it overlaps with the floated element
c. it flows around the floated elements
24Which of the following is required for a floated element? a. it must be a block-level element b. it must be an image c. you must set it's width if the width is not implied d. you must set it's position value
c. you must set it's width if the width is not implied
25What happens to a block element that directly follows a floated element? a. it behaves as though the floated element were not there b. it flows around the floated element c. it inherits the styling of the floated elements d. it inherits the height of the floated elements
a. it behaves as though the floated element were not there
26which of the following could be used to stop elements following a floated element from flowing around or ignoring it? a. clear: left; b. float: stop; c. float: clear; d. clear: all;
a. clear: left;
27Why so parent elements recognize their floated child elements? a. bc floated elements can't contain content b. because parent elements are mean c. bc floated elements are outside the normal document flow d. bc parent elements can't be inline elements
c. bc floated elements are outside the normal document flow
28what property and value can you apply to a parent element to force it to recognize floated child elements? a. overflow: auto; b. display: none; c. clear fix: hack; d. position: positive;
a. overflow: auto;
29which type of html element will always by default appear on a new line in the browser? - block - initial - inline - wrapper
block
30the portion of a web page that must contain all the content to be displayed on the page should be coded as an HTML5 <section> element <body> element <main> element <div> element
<body> element
31what is the term we use to describe any item on a web page that can be distinguished via HTML tags? - attribute - value - element - document
element
32HTML is used to define - the structure and content of a web page - the interactivity of a web page - the styling of a web page - all of the above
the structure and content of a web page
33how many levels of heading text does HTML include by default
6
34the <title> element in the <head> section of an HTML document specifies the text - that's used to refer to the document - that's used to refer to the application - that's displayed in the browsers tab for the page - that's displayed in the status bar of the browser
that's displayed in the browsers tab for the page
35how can you easily view the code behind a website that you find online? - use the developers tools in your browser - submit a request through W3C - reverse-engineer the site according to your understanding of best practices
use the developers tools in your browser
36the div element should only be used - when the existing HTML5 structural-semantic elements don't apply - for compatibility with older browsers - to identify any portion of text that you need to apply formatting to - to identify portions of inline elements
when the existing HTML5 structural-semantic elements don't apply
37which of the following is an inline element by default? <p></p> - the id attribute <meta></meta> <span></span>
<span></span>
38which of the following is the best choice to tag the header area in HTML (that is, the area at the very top of a website where users can typically find the name and logo of that site, among other things)? <header></header> <div id="header"></div> <div class="header"></div> <head></head>
<header></header>
39if you want to specify a font size of 24px for only the first line of every <p> element on a web page, which of the following rules could I use?
p::first-line {font-size: 24px}
40if the following CSS appears in a stylesheet, what color will the associated <h1> appear? h1, h2, h3 {color:red; font-size: 36px} h3 {font-size: 24px} h1 {color-blue} - red - blue - black - whatever the browser's default is
blue
41which CSS property should you alter to create more space between the outer edge of an element and the outer edge of it's nearest neighbor? - padding - margin - border - display
margin
42if you set the background color of the body of a page to blue but don't set the background color for a section you create within the body, the background of the section will be - blue - white - the default background color set by the browser - the default background color set by the <html> element
blue
43to apply the styles in an external style sheet to an html document, you need to code - a style element in the head section - a link element in the head section - a style attribute for the body element - a link attribute for the body element
a link element in the head section of the web page
44a child selector in CSS allows you to select elements that - are any descendent of an element - are a direct descendant of an element - have an attribute that matches the specified child - have a class that matches the specified child
are a direct descendant of an element
45if two CSS declarations conflict, which type of declarations has the lowest priority? - !important declarations in the users style sheer - normal declarations within the web page - normal declarations in the user's style sheet - default declarations of the user agent style sheetrowser
default declarations of the user agent style sheetrowser
46by default, an element in the box model is - as tall as the block that contains it - as wide as it's widest inline element - as tall as it needs to be to contain it's contents - as wide as any inline elements that contains it
as tall as it needs to be to contain it's contents
47in the box model for an element, the border - is beyond the margin - is between the padding and the margin - is inside the padding - is part of the content
is between the padding and the margin
48pseudo-class selectors let you apply formatting - to selected portions of text - to elements that specify multiple classes - when a button control is clicked - to the element in specific states or conditions
- to the element in specific states or conditions
49which of the following techniques can you NOT use to create a two-column layout?
code the columns in any order in the HTML and then float both columns to the left
50when you use the float property to create columns for a page layout, you must also set - the width of the floated elements - the height of the floated elements - the margins and padding of the floated elements - the width & height of the floated elements
the width of the floated items
51When you set the position property for a block element to absolute, the browser - takes the element out of the flow of elements on the web page - keeps the element in the flow of elements on the web page - doesn't allow the element to overlap other elements on the web page - positions the element relative to the browser window
takes the element out of the flow of elements in the web page
52when you use fixed positioning for a block element, you can
use the top, bottom, left and right properties to set it's position on the page
53of the following measurement options, which is the best choice if you want to create a fluid layout?
%
54to use floats to create a three column page layout consisting of an aside, a main element, and another aside, you need to set
the width of the body element and one or more of the contained elements
55you've floated two elements to the left to position them as consecutive columns on a page. now you want to create a full-viewport-width footer element that is positioned below the two columns without interfering with them, which of the following property-value pairs can you use to ensure the footer element does this?
clear: left;
56in order to apply absolute positioning to an element, you must also
apply an explicit position value to it's next nearest container element
57when elements overlap on a webpage, what property can you use to indicate which elements should appear in from of/or behind the others?
z-index
58when you set the position property for a block element to fixed, the element
doesn't move in the browser window, even when you scroll
59by default, an ordered list is displayed as a
numbered list
60you can use the CSS list-style-type property to change
the bullet or number style in a UL or OL
61the href attribute for an <a> element specifies
the page and/or placeholder that the link should go to
62to remove the underlining from an <a> element, you can use CSS to set its
text-decoration property to none
63where does the link created by this code go to> <a href="8reasons.html#reasons6">Complete, real-world applications</a>
the element with reason6 as it's id on the page named 8reasons.html
64a vertical navigation menu is best coded as
a series of <a> elements within the li elements of an unordered list
65one way to creat a horizontal navigation menu from an unordered list is to
set the float property of each li element to the left
66to create a drop-down menu from an item in a horizontal navigation bar, you nest
a ul element within an li element of the ul element for the navigation bar
67one way to create a menu that drops down from an item in a navigation bar when the user hovers over it is to use CSS to change the display property for the menu
from none to block
68to position a drop-down menu directly below an item in the navigation bar, you apply
absolute positioning the ul element for the drop-down list
69When you use viewport height (vh) to size fonts
the font size changes as the size of the viewport changes
70which of the following do you NOT have to create a scalable image whose width is limited to it's native size?
set the image heigh property to auto
71when you develop responsive web pages, you use a meta element the HTML to
set the width of the viewport to the device width
72when will the styles for the media query that follows be applied? @media only screen and (min-width: 768px) and (max-width: 959px)
when the width of the screen is greater than 768 px and less that 959 px
73to lay out a webpage so it adjusts to the width of the screen, you use
a fluid layout
74when yours Ems or percentages to size fonts
the font size changes as the size of the font used by it's parent element changes
75to get a layout to stack vertically instead of horizontally when viewed on a phone, you can use
media queries
76a scalable image is scaled
to the width of the element that contains it
77in this class, we'll test the responsiveness of our web sites by
use the developers tools of a modern browser
78support the fixed width of an aside element in a fixed layout is 300 px, and then the fixed width of it's parent element (body) is 900 px. if you convert the page from fixed to fluid layout, the width of the aside should be set to
33.33%