Final Test Review

Ace your homework & exams now with Quizwiz!

True or false: The "hidden" and "password" input types on HTML forms are designed to encrypt sensitive information such as administrative passwords or a user's personal information.

False

Put the remaining items below into the correct order in terms of their importance in the CSS inheritance model. User agent style sheet - 6th most important User style sheet - 5th most important _____ - 4th most important _____ - 3rd most important _____ - 2nd most important _____ - most important

4th most important → external style sheet, 3rd most important → internal style sheet , 2nd most important → inline style sheet, most important → !important

Which of the following is correct for the question "Which type of car is shown in the photo?"

<input type = "radio" name = "car" value = "lex" > Lexus <input type = "radio" name = "car" value = "inf" > Infinti <input type = "radio" name = "car" value = "acr" > Acura

Match the color concept to the best description of it.

Colors that lie 150 degrees and 210 degrees across from a given color on the color wheel. → Split complementary, Colors that are 180 degrees apart from each other on the color wheel. → Complementary, Three colors that lie an equal distance from one another on the color wheel. → Triadic, Colors that are adjacent to each other on the color wheel. → Analogous

Match the color to its correct hex value.

Cyan → #00FFFF, Black → #000000, Red → #FF0000, Gray → #AAAAAA, Yellow → #FFFF00, Blue → #0000FF, Magenta → #FF00FF, Green → #00FF00

True or false: It is good practice to end your font stack with a generic font from a different visual style as the preferred font. That way, if the preferred font is not available, the generic font will indicate - very clearly - that something is wrong.

The correct answer is 'False'.

Given the directory structure shown above, which of the following is the correct way to link to the style.css file from the main, top-level index.html page?

The correct answer is: <link rel="stylesheet" type="text/css" href="css/style.css">

True or false: Assuming we add the required attribute to several fields in our web form, and a user views the form in a non-supporting browser, such as Internet Explorer 9.0, the user will be able to submit the form despite it having empty fields.

True

What is the proper name for * in the code below? * { margin: 0; }

Universal selector

Match the html element to the best description of it

Used to create a highlighter effect, usually in yellow. → mark, Used for inaccurate text. Usually shown in strikethrough → s, Used for computer code. Text shows as monospace font. → code, Used for acronyms or abbreviations. Text shows up in tooltip. → abbr

In JavaScript, the isNaN() function determines whether a value is an illegal number (Not-a-Number). This function returns true if the value equates to NaN. Otherwise it returns false. For each of the expressions shown, state whether they will return true or false.

isNaN(123) - false isNaN('hello') - true isNaN(0) - false isNaN(1-0) - false

Given the code below, what will be the color of the word Hello? <style>div { color: blue;}</style> <div style="color: red;">Hello</div>

red

Using the description below, write the rgb() specification for the color white. Enter the entire expression, including the "rgb()" part and all the numbers.

rgb(255,255,255)

Suppose you have a form with a question of "Which country do you live in?" Which is the best form input type for this question?

select

Hidden and password input types on forms are treated like ____ types.

text

True or false: If you have a less popular system font you want to try, you should put it at the beginning of the stack.

true

True or false: In the code below, p is the descendant and span is the ancestor. span p { color: red; }

true

True or false: With the following HTML form (assume no JavaScript is being used here), it is possible for the user to select all four options.

true

For form inputs: A default value provided in the ____ attribute will always be included when the form is submitted, but a value provided in the ____ will not be included when the form is submitted.

value, placeholder

Given the following code, match each printed word to its correct output color. <style> p.colored-text { color: purple; }.colored-text { color: blue; }div p { color: yellow; }div > p { color: green; }p { color: red; } </style> <div class="colored-text"> <p class="colored-text">Hello</p> <p>World</p> <p>CSS</p> <p id="colored-text">is</p> <span>SOOOO</span></div><p>great.</p>

"Hello" is inside a p with a class of 'colored-text' so it will be purple. The score is 1 for element and 10 for class, 11. "World" is inside a p tag that is the child of div, so its output color is green. Same with "CSS"; it is green. The word "is" has an ID of "colored-text", but there is no specifier for that ID. So it also inherits the generic p tag, which is green. The word "SOOOO" is inside a span tag, but there is no specifier for spans, so the div class is inherited. Thus, SOOOO is blue. Finally, the word "great" is inside a p tag that is not a child of div and has no class specification, so it is red. The correct answer is: Hello → purple, World → green, CSS → green, is → green, SOOOO → blue, great. → red

True or false: A good value for text line height, or leading, is .75 times the current line height.

.75 is too tight. The correct answer is 'False'.

What are some of the advantages to choosing hosted web fonts for a web design project? (You may choose multiple.)

All copyright permissions to use the fonts have already been cleared by a responsible hosting agency., There are more fonts available for use; more choices., The fonts provided by a reliable hosting provider will be highly-available and will not require cumbersome installation on a user's machine.

Match the HTML5 form enhancement to the best description of its functionality.

Autofocus - This attribute specifies which form element which will receive keyboard, mouse, and similar events by default. Should only be used once, per page. Autocomplete - This attribute specifies which form element(s) have prior user inputs recalled and automatically entered into fields as suggestions. Placeholder- Attribute that provides a helpful hint to explain to users what they should enter into the form field. Required - Attribute that allows the browser to prompt the user to fill in missing data in a form field. datalist- This element supports a pre-defined selection of suggested values in a drop-down format, and also lets users enter their own values.

Match the term to the correct description of it.

Refers to how pure a color is. Measured between as a percent, between 0-100. Lower numbers mean more gray is mixed in. → Saturation, Specifies how light or dark a color is. Measured as a percent, between 0-100. Lower numbers mean closer to black. Higher numbers mean closer to white. → Luminance, Synonym for "color". Refers to the color's position on the color wheel, between 0 and 359, where red = 0. → Hue

Using the web page element tree below, state whether each assertion is true or false.

The element 'title' is a descendent of 'head'. → TRUE, The 'body' element is the ancestor of 'a'. → TRUE, The 'head' is the adjacent sibling of 'body'. → FALSE, The attribute 'href' is a descendant of 'a'. → FALSE, The element 'p' and 'h2' are siblings. → TRUE, The 'p' and 'a' elements are both descendants of 'body'. → TRUE

Given this table of regular expression metacharacters below, which of the following string values for myVariable will pass the test and will alert Valid? var isValid = /^\d{5}$|^\d{5}-\d{4}$/.test(myVariable);if (isValid){alert('Valid');}else {alert('Invalid');}

This is a tester for 5 digit or 5+4 digit zip codes. The correct answer is: 24569-1001

Match the scenario to the best solution. Use each answer once.

Used when there is one and only one item on the page that will be styled a certain way, for example there is only one <img> tag and it needs to look a certain way. → Use an id selector Used when every case of a given element needs to be styled the same way, for example every <p> tag on the page needs to look the same. → Use an element selector, Used when there are multiple different items on the page that need to be styled all the same way, for example a <div> and a <p> need to both be 10 pt Caslon bold. → Use a class selector

In the code sample below, what value will be sent to the server for the "faveColor" input? <input type="text" name="faveColor" value="blue" maxlength=20 required></input>

Whatever the user types in the box

Which is the correct code to change the text in the following paragraph from Blue to Orange? <p id="faveColor">Blue</p>

document.getElementById("faveColor").innerHTML="Orange";

True or false: With new HTML5 form attributes such as "required", there is no longer a need to write JavaScript form validation routines.

false

Which of the following is the correct syntax for an if statement in JavaScript?

if (i == 5)


Related study sets

Animal Science 101L Exam Questions

View Set

Chapter 2: Something You Are - Biometric Methods

View Set

Chapter 4: Network Access - Intro. to Networks v6

View Set

Natural Disaster in a Small Community - HESI RN Case Studies

View Set