Microsoft Programming in HTML5 with JavaScript and CSS3 - 70-480 Exam Practice Test
You are developing a web page by using HTML5.
You have the following requirements:
* An H1 element must be placed at the top left corner of the page.
* The size and location of the H1 element must not change if additional elements are added to the page.
You need to position the H1 element on the page.
Which CSS3 style should you use?

You have the following requirements:
* An H1 element must be placed at the top left corner of the page.
* The size and location of the H1 element must not change if additional elements are added to the page.
You need to position the H1 element on the page.
Which CSS3 style should you use?

Correct Answer: B
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
You are creating a JavaScript function that displays the name of a web application.
You declare the following button element.

When a user clicks the button, a JavaScript function named Contact must be called.
You need to create an event handler that calls the Contact function when the button is clicked.
Which two code segments can you use? (Each correct answer presents a complete solution. Choose two.)

You declare the following button element.

When a user clicks the button, a JavaScript function named Contact must be called.
You need to create an event handler that calls the Contact function when the button is clicked.
Which two code segments can you use? (Each correct answer presents a complete solution. Choose two.)

Correct Answer: D
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
You have the following code.
You need to ensure that the function returns true if the value of each object in arrayObj is more than 10.
How should you complete the code? To answer, drag the appropriate code elements to the correct targets. Each code element may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.

You need to ensure that the function returns true if the value of each object in arrayObj is more than 10.
How should you complete the code? To answer, drag the appropriate code elements to the correct targets. Each code element may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.

Correct Answer:

Explanation

References:
https://www.w3schools.com/jsref/jsref_obj_array.asp
You are creating a web page that contains a canvas with text.
The page contains the following JavaScript code. (Line numbers are included for reference only.)

The text on the canvas must rotate 90 degrees when a user clicks a button on the page.
You need to ensure that the text rotates when the user clicks the button.
Which line of code should you add at line 03?
The page contains the following JavaScript code. (Line numbers are included for reference only.)

The text on the canvas must rotate 90 degrees when a user clicks a button on the page.
You need to ensure that the text rotates when the user clicks the button.
Which line of code should you add at line 03?
Correct Answer: B
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
You develop an HTML application that contains a table that displays a list of products. The table is defined with the following HTML markup:

You must style the table to look like the following image:

You need to implement the CSS selectors to select the rows that must have a blue background.
Which CSS selector should you use?

You must style the table to look like the following image:

You need to implement the CSS selectors to select the rows that must have a blue background.
Which CSS selector should you use?
Correct Answer: A
Vote an answer
You are developing a web page by using HTML5 and C5S3. The page includes a <div> tag with the ID set to validate.
When the page is rendered, the contents of the <div> tag appear on a line separate from the content above and below it. The rendered page resembles the following graphic.

The page must be rendered so that the <div> tag is not forced to be separate from the other content. The following graphic shows the correctly rendered output.

You need to ensure that the page is rendered to meet the requirement.
Which line of code should you use?
When the page is rendered, the contents of the <div> tag appear on a line separate from the content above and below it. The rendered page resembles the following graphic.

The page must be rendered so that the <div> tag is not forced to be separate from the other content. The following graphic shows the correctly rendered output.

You need to ensure that the page is rendered to meet the requirement.
Which line of code should you use?
Correct Answer: A
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
You develop a website for a company by using HTML5.
You have the following requirements:
* Allow multiple news postings per page under the title "Welcome to the Semantic Web!".
* Search engines must be able to index individual news postings.
* News postings must be styled by using the following CSS markup:
.posting { line-height: 150%; )
You need to structure the markup for each individual news posting.
How should you complete the relevant markup? (To answer, drag the appropriate markup to the correct location or locations in the answer area. Use only markup that applies.)

You have the following requirements:
* Allow multiple news postings per page under the title "Welcome to the Semantic Web!".
* Search engines must be able to index individual news postings.
* News postings must be styled by using the following CSS markup:
.posting { line-height: 150%; )
You need to structure the markup for each individual news posting.
How should you complete the relevant markup? (To answer, drag the appropriate markup to the correct location or locations in the answer area. Use only markup that applies.)

Correct Answer:

Explanation

* The <article> element specifies independent, self-contained content.
Examples of where an <article> element can be used:
Forum post
Blog post
Newspaper article
* The <header> element specifies a header for a document or section.
* when declaring the div element we must refer to CSS style named posting with a class="posting" attribute.
Reference: HTML5 Semantic Elements
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?
You need to group relevant page content together to maximize search engine readability.
Which tag should you use?
Correct Answer: B
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
You have the following code. (Line numbers are included for reference only.)

For each of the following statements, select Yes if the statement is true. Otherwise, select No.


For each of the following statements, select Yes if the statement is true. Otherwise, select No.

Correct Answer:

Explanation
No
Yes
No
https://www.w3schools.com/cssref/pr_margin-left.asp
https://css-tricks.com/almanac/properties/t/transition/
https://www.w3schools.com/cssref/css3_pr_transition.asp
You are developing an HTML5 page. The page includes the following code.

The inner paragraph must be exactly 15 pixels from the top left corner of the outer paragraph. You set the left style for the inner paragraph to the appropriate value.
You need to set the position property of the inner paragraph.
Which value should you use?

The inner paragraph must be exactly 15 pixels from the top left corner of the outer paragraph. You set the left style for the inner paragraph to the appropriate value.
You need to set the position property of the inner paragraph.
Which value should you use?
Correct Answer: C
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
You have the following code:

The web service returns a JSON object that contains two properties named Description and FileName.
The PersonImage object must meet the following requirements:
* Create an object that represents an image that will be displayed.
* Set the image properties from the values that are returned by the web service.
* Expose the image as a property of the PersonImage object.
You need to insert code at line 13 to complete the implementation of the PersonImage object.
Which three actions should you perform in sequence to complete the implementation? (Develop the solution by selecting the required code segments and arranging them in the correct order.)


The web service returns a JSON object that contains two properties named Description and FileName.
The PersonImage object must meet the following requirements:
* Create an object that represents an image that will be displayed.
* Set the image properties from the values that are returned by the web service.
* Expose the image as a property of the PersonImage object.
You need to insert code at line 13 to complete the implementation of the PersonImage object.
Which three actions should you perform in sequence to complete the implementation? (Develop the solution by selecting the required code segments and arranging them in the correct order.)

Correct Answer:

Explanation
Box 1: var img = document.createElement('img');
Box 2: img:alt = image.Description;
img src = image.FileName;
Box 3: return this.img;
Note:
* Image Object
The Image object represents an embedded image.
For each <img> tag in an HTML document, an Image object is created.
Notice that images are not technically inserted into an HTML page, images are linked to HTML pages. The
<img> tag creates a holding space for the referenced image.
* Image Object Properties include
alt, Sets or returns the value of the alt attribute of an image
src, Sets or returns the value of the src attribute of an image
You are styling a box object on a page by using CSS3.
You need to set the transparency of the object to 50%.
Which two CSS3 styles will achieve the goal? (Each correct answer presents a complete solution. Choose two.)

You need to set the transparency of the object to 50%.
Which two CSS3 styles will achieve the goal? (Each correct answer presents a complete solution. Choose two.)

Correct Answer: A,D
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).