Front-end Development questions collection HTML

Source: Internet
Author: User
Tags sessionstorage

What is DOCTYPE? Description features.
    • The <!doctype> declaration must be in the head of the HTML document before the label.
    • The <!doctype> declaration is not an HTML tag, it is a way to tell the browser which HTML specification to use.
    • The label can declare three DTD types, each representing a strict version, a transition version, and a framework-based version.
What is the difference between the title and Alt of IMG?
    • The title is used to provide additional hints for the element, which is usually displayed when the mouse is slid over the element.
    • ALT is an IMG-specific attribute, which is a custom description of the content of the picture that describes the picture when it cannot be loaded.
    • The search engine will analyze the alt description.
What is web semantics and why is it necessary to be semantic?
    • Refers to the information that the page contains by means of HTML tags, including the semantics of HTML tags and the semantics of CSS naming.
    • The semantic meaning of HTML tags refers to the use of appropriate representations of document structures such as H1-H6.
    • The semantics of CSS naming refers to the addition of a meaningful class and ID for HTML tags.
      Reasons for needing semantics:
      • The page still has a clear structure after removing the style.
      • The blind use the screen reader to read better.
      • Search engine better understanding of the page, conducive to inclusion.
      • Team projects are continuously operational and maintained.
What are the inline elements, block-level elements, and empty elements?
    • Each element has a display property that represents the type of the element, such as the div default display is block, which is a blocks-level element, and span is inline, which is an inline element.
    • Inline elements: A b span img Input Select strong
    • Block-level elements: div ul ol li DL DT DD H1 H2 H3 h4 h5 p
    • Empty element: BR hr img Input link meta etc
What are the browsers ' cores, respectively?
    • The kernel of IE browser is Trident
    • Mozilla's kernel is Gecko
    • Chrome's kernel is Blink (WebKit's branch)
    • Other browsers slightly
What are the drawbacks of IFRAME?
    • The IFRAME blocks the onload event on the main page.
    • The iframe and the main page share the connection pool, and the browser has restrictions on the connection to the same domain, which can affect the parallel loading of the page.
    • Dynamically adding the SRC attribute to the IFRAME avoids the above problems.
What are the differences between cookies, seesionstorage and localstorage?
    • The cookie is passed back and forth between the browser and the server, not others.
    • Sessionstorage and Localstorage have richer interfaces.
    • Sessionstorage and Localstorage have their own separate storage space.
What if I communicate between multiple tabs within a browser?
    • Use Localstorage, cookies and other local storage methods.
WebSocket If a low browser is compatible?
    • Adobe Flash sockets
    • ActiveX Htmlfile (IE)
    • Send XHR based on multipart encoding
    • XHR based on long polling
What is the difference between src and href?
    • SRC is the abbreviation for source, pointing to the location of the external resource, which will download the location of the current tag embedded in the document, such as JS, IMG, frame.
    • HREF is the abbreviation for hypertext reference, which points to the location of the network resource, establishes the link between the current element or the current document.
What is the difference between HTML and XHTML?
    • XHTML elements must be nested correctly
    • XHTML elements must be closed, and empty tags will be closed.
    • XHTML must be in lowercase letters.
    • Xhml must have a root element
    • XHTML requires that all properties have values.
    • XHTML requires that all properties be "" enclosed.
    • XHTML needs to encode all the special symbols <, >, & And so on.
    • XHTML documents do not use "-" in the comment content.
    • XHTML images must have descriptive text.
    • In XHTML, replace name with ID.
What are the new features of HTML5?
      • New meta-statement
      • Tag header, nav, video, audio, canvas, SVG
      • New form features email, number, color, tel, and more
      • JS API localstorage, Seesionstorage, Classlist, Devicemotionevent, FileReader, drag, etc.

Front-end Development questions collection HTML

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.