exam questions

Exam 70-480 All Questions

View all questions & answers for the 70-480 exam

Exam 70-480 topic 4 question 21 discussion

Actual exam question from Microsoft's 70-480
Question #: 21
Topic #: 4
[All 70-480 Questions]

You are creating a blog site by using HTML5 and JavaScript. An inline frame enables users to post comments. It is possible for users to inject malicious scripts into their comments.
You need to minimize the ability for malicious scripts to execute on the site.
Which line of code should you use?

  • A. <iframe sandbox src="frame1.htmlnX/iframe>
  • B. <iframe seamless="allowscripts" src="frame1.html"<>/iframe>
  • C. <iframe seamless src="frame1.html"></iframe>
  • D. <iframe sandbox="allowscripts" src"frame1.html"x/iframe>
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️
The sandbox attribute enables an extra set of restrictions for the content in the iframe.

Syntax -
<iframe sandbox="value">

Attribute Values -
no value: Applies all restrictions
etc.
No attribute value: allowscripts (not D)
Reference: HTML <iframe> sandbox Attribute

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Currently there are no comments in this discussion, be the first to comment!
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago