Some common face questions of some HTML5 and CSS3

Source: Internet
Author: User
Tags sessionstorage

Recently summed up some common interview questions about HTML5 and CSS3, hoping to help you find a job. We also welcome you to add ~ ~ ~

First, HTML5 CSS3

  <1>. What are the new features of CSS3?

    1. CSS3 to achieve fillet (Border-radius), Shadow (Box-shadow),

2. Add effects to Text (Text-shadow,), linear gradient (gradient), rotation (transform)

3.transform:rotate (9deg) scale (0.85,0.90) translate (0px,-30px) skew ( -9deg,0deg);//rotate, zoom, position, tilt

4. Added more CSS selectors multi-background Rgba

5. The only pseudo-elements introduced in CSS3 are:: Selection.

6. Media query, multi-column layout

7. Border-image

What are the new features and elements removed from <2>.HTML5? How do I handle browser compatibility issues with HTML5 new tags? How do I differentiate between HTML and HTML5?

  New features:

1. Drag release (Drag and Drop) API

2. Semantically Better content tags (header,nav,footer,aside,article,section)

3. Audio, Video API (Audio,video)

4. Canvas API

5. Geography (geolocation) API

6. Local offline storage Localstorage long-term storage data, the browser is closed after the data is not lost; Sessionstorage data is automatically deleted after the browser is closed

7. Form controls, calendar, date, time, email, url, search

8. New technology Webworker, WebSocket, geolocation

  Elements to remove:

1. Elements of pure expression: Basefont,big,center,font, s,strike,tt,u;

2. Elements that have a negative impact on usability: frame,frameset,noframes;

  Support for HTML5 new tags:

1. IE8/IE7/IE6 supports the label generated by the Document.createelement method, which allows these browsers to support HTML5 new tags, and after the browser supports new tags, You also need to add the default style of the label (the best way is to use the mature framework directly, the Html5shim framework is the most used):

<!--[If Lt IE 9]>

<script> src= "Http://html5shim.googlecode.com/svn/trunk/html5.js" </script>

<! [endif]-->

  How to differentiate:

DOCTYPE declaration of new structural elements, functional elements

<3>: Describe the difference between cookies,sessionstorage and localstorage?

    Sessionstorage is used to store data locally in a session, which can only be accessed by a page in the same session and destroyed when the session ends. So sessionstorage is not a persistent local store, only session-level storage. While Localstorage is used for persistent local storage, the data will never expire unless the data is actively deleted.

    Web Storage and the Cookies the Difference

The concept of WEB storage is similar to a cookie, except that it is designed for larger capacity storage. the size of the cookie is limited (between 4095-4097 bytes), and every time you request a new page, the cookie is sent past, which virtually wastes bandwidth, and the cookie needs to specify the scope and cannot be called across the domain .

In addition,WEB storage has methods such as Setitem,getitem,removeitem,clear , unlike cookies that require front-end developers to encapsulate Setcookie,getcookie themselves. However, cookies are also not available or missing: The role of cookies is to interact with the server as part of the HTTP specification, and Web Storage is only for local "storage" of data.

  <4>: How do I embed audio in the HTML5 page?

HTML 5 contains the standard way to embed audio files, supported formats include MP3, Wav, and Ogg:

<audio controls>

<source src= "Jamshed.mp3" type= "Audio/mpeg" >

Your Browser does ' NT support audio embedding feature.

</audio>

  <5>: How do I embed videos in the HTML5 page?

Like audio, HTML5 defines a standard method for embedding video, supported in the following formats: MP4, WebM, and Ogg:

<video width= "height=" 340 "controls>

<source src= "Jamshed.mp4" type= "Video/mp4" >

Your Browser does ' NT support video embedding feature.

</video>

Some common face questions of some HTML5 and CSS3

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.