Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 4

2. Which doctype is correct for HTML5?

You answered:
<!DOCTYPE html>
Correct Answer!
3. Which HTML5 element is used to specify a footer for a document or section?
You answered:
<footer>
Correct Answer!
4. Which of the following elements is no longer supported in HTML5?
You answered:
<font>
Correct Answer!
5. Which of the following elements is no longer supported in HTML5?
You answered:
<acronym>
Correct Answer!
6. In HTML5, onblur and onfocus are:
You answered:
Event attributes
Correct Answer!
7. What is the correct HTML5 element for playing video files?
You answered:
<video>
Correct Answer!
8. What is the correct HTML5 element for playing audio files?
You answered:
<audio>
Correct Answer!
9. Which attribute for <script> elements is no longer required in HTML5?
You answered:
type
Correct Answer!
10. In HTML5, which method is used to get the current location of a user?
You answered:
getCurrentPosition()
Correct Answer!
11. The new HTML5 global attribute, "contenteditable" is used to:
You answered:
Specify whether the content of an element should be editable or not
Correct Answer!
12. In HTML5, contextmenu and spellcheck are:
You answered:
HTML attributes
Correct Answer!
13. In HTML5, you can embed SVG elements directly into an HTML page.
You answered:
True
Correct Answer!
14. Graphics defined by SVG is in which format?
You answered:
XML
Correct Answer!
15. The <canvas> element in HTML5 is used to:
You answered:
draw graphics
Correct Answer!
16. Which built-in HTML5 object is used to draw on the canvas?
You answered:
getContext
Correct Answer!
17. In HTML5, which attribute is used to specify that an input field must be fil
led out?
You answered:
required
Correct Answer!
18. Which input type defines a slider control?
You answered:
range
Correct Answer!
19. Which input type defines a week and year control (no time zone)?
You answered:
week
Correct Answer!
20. Which HTML5 element is used to display a scalar measurement within a known r
ange?
You answered:
<meter>
Correct Answer!
***********************************
Pattern element = reg ex stuff
*************************************
<iframe sandbox src="frame1.html"></iframe>
Behavior restricted by sandbox
When iframe elements are sandboxed, the following actions are restricted:
Sandboxed content cannot open pop-up windows or new browser windows. Methods
that open pop-up windows (such as createPopup(), showModalDialog(), showModeles
sDialog(), and window.open()), fail silently.
Links cannot be opened in new windows.
Sandboxed content is considered to be from a unique domain, which prevents a
ccess to APIs that are protected by the same-origin policy such as cookies, loca
l storage, and the Document Object Model (DOM) of other documents.
The top window cannot be navigated by sandboxed content.
Sandboxed content cannot submit form data.
Plugins (object, applet, embed, or frame) do not instantiate.
Automatic element behavior is disabled, including meta element refresh, auto
focus for input controls, and autoplay for audio and video elements.
Selected features proprietary to Windows Internet Explorer are disabled for
sandboxed content, including HTML Components (HTCs), binary behaviors, databindi
ng, and window.external.
Flag Description
allow-scripts
Sandboxed content is allowed to run JavaScript.
allow-forms
Sandboxed content can submit forms.
allow-same-origin
Sandboxed content can access APIs protected by the same-origin policy, including
local storage, cookies, XMLHttpRequest, and documents hosted on the same domain
.
allow-top-navigation
Sandboxed content is allowed to change the location of the top window.
allow-popups
Sandboxed content is allowed to open popup windows.
Note Pre-release versions of Internet Explorer 10 supported this value using a
vendor prefix. Applications that use a vendor-prefix for this value should be up
dated to ensure future compatibility and standards-compliance.
************************************
With the XMLHttpRequest object, clients can retrieve and submit XML data directl
y to a web server without reloading the document. To convert XML data into rende
rable HTML content, use the client-side XML DOM or Extensible Stylesheet Languag
e Transformations (XSLT) to compose HTML elements for presentation.
The following script demonstrates how to create and use the XMLHttpRequest objec
t. For best client-side performance, the XMLHTTP request is asynchronous and use
s an onreadystatechange event handler to process the data returned by the call.
The script uses the getXMLHttpRequest() function defined above to create the req
uest object.
JavaScript
function handler()
{
if (oReq.readyState == 4 /* complete */) {
if (oReq.status == 200) {
console.log(oReq.responseText);
}
}
}
var oReq = getXMLHttpRequest();
if (oReq != null) {
oReq.open("GET", "http://localhost/test.xml", true);
oReq.onreadystatechange = handler;
oReq.send();
}
else {
window.console.log("AJAX (XMLHTTP) not supported.");
}
**********************************************

You might also like