Chapter 1 Flashcards
You are developing an HTML5 web application and are styling text. You need to use the text-transform CSS property. Which value is valid for the text-transform property? A. Lowercase B. Blink C. Line-through D. 20px
A. Lowercase
You are developing a web page for runners who register for a race. The page includes a slider control that allows users to enter their age. You have the following requirements:
- All runners must enter their age.
- Applications must not be accepted from runners less than 18 years of age or greater than 90 years.
- The slider control must be set to the average age (37) of all registered runners when the page is first displayed.
How the form element should like?
Answer:
input type=”range” min=”18” max=”90” step=”value” value=”37” required
You are creating a JavaScript object that represents an employee.
You need to extend the Employee object by adding the GetPayroll() method.
You need to ensure that all future instances of the Employee object implement the GetPayroll() method.
Which code segment should you use?
Employee.prototype.GetPayroll = function()
{
alert(“payroll”);
}
You are developing an HTML5 page that includes several paragraph elements. You have the following requirements:
- Add a drop shadow that is one inch below the text in the paragraph
- Set the radius of the drop shadow to five pixels
You need to style the paragraphs to meet the requirements. Which CSS style should you use?
A. Text-shadow: 72pt 0pt 5pt
B. Text-shadow: 5px lin 0px;
C. Text-shadow: 72pt 0em 5px;
D. Text-shadow: 100px 0px 5px;
B. Text-shadow: 5px lin 0px;
/* offset-x | offset-y | blur-radius | color */ text-shadow: 1px 1px 2px black;
/* color | offset-x | offset-y | blur-radius */ text-shadow: #CCC 1px 0 10px;
/* offset-x | offset-y | color */ text-shadow: 5px 5px #558ABB;
/* color | offset-x | offset-y */ text-shadow: white 2px 5px;
/* offset-x | offset-y /* Use defaults for color and blur-radius */ text-shadow: 5px 10px;
You are developing an HTML5 web application and are styling text. You need to use the text-transform
CSS property.
Which value is valid for the text-transform property?
A. Capitalize
B. Red
C. 20px
D. Italic
A. Capitalize
//NOTE text-transform : capitalize | uppercase | lowercase| none
You are modifying a blog site to improve search engine readability.
You need to group relevant page content together to maximize search engine readability.
Which tag should you use?
A. < article >
B. < table >
C. < div >
D. < span >
A. < article >
You are developing an HTML5 page that has an element with an ID of picture. The page includes
the following HTML.
< div >
Picture : <br></br>
<div>
</div>
You need to move the picture element lower on the page by five pixels.
Which two lines of code should you use? (Each correct answer presents part of the solution. Choose two.)
A. document.getEIementById(“picture”).style.position = “relative”;
B. document.getElementById(“picture”).style.top = “5px”;
C. document.getEiementById(“picture”).style.top = “-5px”;
D. document.getEIementById(“picture”).style.position = “absolute”;
Correct
A. document.getEIementById(“picture”).style.position =
“relative”;
B. document.getElementById(“picture”).style.top = “5px”;
Incorrect :
C. document.getEiementById(“picture”).style.top = “-5px”;
- This will move element 5 px up, not down
D. document.getEIementById(“picture”).style.position = “absolute”;
- This will take out the element from normal flow.
You are modifying a blog site to improve search engine readability. You need to group relevant page
content together to maximize search engine readability. Which tag should you use?
A. section
B. tbody
C. div
D. table
A. section
You are developing a customer web form that includes the following HTML.
You need to change the HTML markup so that customers can enter only a valid three-letter country
code. Which HTML should you use?
A. input id=”txtValue” type=”country”/
B. input id=”txtValue” type=”text” required=”xxx”/
C. input id=”txtVa!ue” type=”text” pattern=” [A-Za-z] {3} “/
D. input id=”txtValuen type=”code” pattern”=”country”/
C. input id=”txtVa!ue” type=”text” pattern=” [A-Za-z] {3} “/
You are developing an HTML5 web application and are styling text. You need to use the texttransform
CSS property. Which value is valid for the text-transform property?
A. Capitalize
B. Hidden
C. Italic
D. Line-through
A. Capitalize
You are modifying a blog site to improve search engine readability. You need to group relevant page
content together to maximize search engine readability. Which tag should you use?
A. tbody
B. article
C. div
D. span
B. article
You are modifying a blog site to improve search engine readability. You need to group relevant page
content together to maximize search engine readability. Which tag should you use?
A. span
B. nav
C. cable
D. section
D. section
You are creating an application by using HTML5 and CSS3. The styles for the pages are derived from
five style sheets. The styles are not being applied correctly to the pages in the application. You need
to determine the order in which the style sheets will be applied by the browser. In which order will
the five style sheets be applied?
- user agent style sheets
- user normal style sheets
- author normal style sheets
- author important style sheets
- user important style sheets
user normal style sheets author normal style sheets author important style sheets user important style sheets user agent style sheets
You develop an HTML5 webpage. You have the following HTML markup: table tr th th th tr td td td tr td td td tr td td td
table { border: 1px solid black; font-family: Arial;}
tr:nth-child(odd){background-color: red;}
tr td:nth-child(even){background-color: blue;}
You need to determine how the webpage will appear when the CSS styles are applied. Select two.
A. The first row of the table will have a red background.
B. The second row of the table will have a red background.
C. The second cell in the first row of the table will have a blue background.
D. The second cell in the third row of the table will have a blue background.
E. The second cell in the third row of the table will have not have blue background.
A. The first row of the table will have a red background.
B. The second row of the table will have a red background. - INCORRECT , second row is the even one and the style will not apply
C. The second cell in the first row of the table will have a blue background. - INCORRECT, first row contains only TH cells, not the TD one.
D. The second cell in the third row of the table will have a blue background. - CORRECT
E. The second cell in the third row of the table will have not have blue background. - INCORRECT - will have the blue background
// https://jsfiddle.net/ht7df4p7/2/
You are reviewing the CSS markup for an HTML5 page that displays a news article. The CSS markup
for the page is as follows:
h4 { color : powderblue; }
.headline { color: red; }
article { color: black; font-style: normal }
aside h4 { font-style: italic !important; color: yellow; }
article h4 { font-style: normal; color: sienna; }
div h4 international News article h4 class="headline" New Developments aside h4 Impact on Markets
What is True:
A. The color of the International News header is red;
B. The color of the New Developments! header is black,
C. The color of the Impact On Markets header is yellow,
D. The text of the Impact On Markets header is italicized
A. The color of the International News header is red; - INCORRECT
B. The color of the New Developments! header is black,- INCORRECT
C. The color of the Impact On Markets header is yellow, - INCORRECT
D. The text of the Impact On Markets header is italicized - CORRECT