234676440-Html5-Notes

download 234676440-Html5-Notes

of 4

Transcript of 234676440-Html5-Notes

  • 2. Which doctype is correct for HTML5?

    You answered:

    Correct Answer!

    3. Which HTML5 element is used to specify a footer for a document or section?

    You answered:

    Correct Answer!

    4. Which of the following elements is no longer supported in HTML5?

    You answered:

    Correct Answer!

    5. Which of the following elements is no longer supported in HTML5?

    You answered:

    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:

    Correct Answer!

    8. What is the correct HTML5 element for playing audio files?

    You answered:

    Correct Answer!

    9. Which attribute for 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 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 filled 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 range?

    You answered:

    Correct Answer!

    ***********************************Pattern element = reg ex stuff

    *************************************

    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(), showModelessDialog(), and window.open()), fail silently. Links cannot be opened in new windows. Sandboxed content is considered to be from a unique domain, which prevents access to APIs that are protected by the same-origin policy such as cookies, local 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, autofocus 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, databinding, and window.external.

    Flag Descriptionallow-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 directly to a web server without reloading the document. To convert XML data into renderable HTML content, use the client-side XML DOM or Extensible Stylesheet Language Transformations (XSLT) to compose HTML elements for presentation.

    The following script demonstrates how to create and use the XMLHttpRequest object. For best client-side performance, the XMLHTTP request is asynchronous and uses an onreadystatechange event handler to process the data returned by the call. The script uses the getXMLHttpRequest() function defined above to create the request 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.");}

    **********************************************