Table of Contents
Introduction
HTML5中什么是输出元素?
什么是SVG(可缩放矢量图形(Scalable Vector Graphics))?
我们能看到使用HTML5的SVG的简单例子么?
HTML5中canvas是什么?
我们如何使用Canvas来画一条简单的线?
Canvas和SVG图形的区别是什么?
如何使用Canvas和HTML5中的SVG去画一个矩形?
CSS(级联样式表(cascading style sheets))中的选择器是什么?
如何使用ID值来应用一个CSS样式?
CSS中使用列布局是什么?
你能解释一下CSS的盒子模型么?
你能解释一些CSS3中的文本效果么?
什么是Web Workers?为什么我们需要他们?
Web Worker线程的限制是什么?
我们如何在JavaScript中创建一个worker线程?
如何中止Web Worker?
为什么我们需要HTML5的服务发送事件?
HTML5中的本地存储概念是什么?
我们如何从本地存储中添加和移除数据?
本地存储的生命周期是什么?
本地存储和cookies(储存在用户本地终端上的数据)之间的区别是什么?
什么是事务存储?我们如何创建一个事务存储?
本地存储和事务存储之间的区别是什么?
什么是WebSQL?
WebSql是HTML5的一个规范吗?
我们如何使用WebSQL?
HTML5中的应用缓存是什么?
HTML5中我们如何实现应用缓存?
我们如何刷新浏览器的应用缓存?
应用缓存中的回退是什么?
应用缓存中的网络是什么?
Home Web Front-end H5 Tutorial 40 HTML5 interview questions (with answers)

40 HTML5 interview questions (with answers)

May 07, 2017 am 11:52 AM

40 HTML5 interview questions (with answers)

Introduction

I am an ASP.NET MVC developer. Recently, when I was looking for a job, I was asked a lot of questions related to HTML5 and New features. So the following 40 important questions will help you review your HTML5 related knowledge.

These questions are not an efficient solution to getting you the job, but they can be helpful when you want to quickly review a related topic.

Happy job hunting.

40 HTML5 interview questions (with answers)

What is the relationship between SGML (Standard Generalized Markup Language) and HTML (Hypertext Markup Language), XML (Extensible Markup Language) and HTML?

SGML (Standard General Markup Language) is a standard that tells us how to specify document markup. It is a metalanguage that only describes how document markup should be, and HTML is a markup language described by SGML.

Therefore, SGML is used to create HTML references and DTDs that must be adhered to together. You will often find the "DOCTYPE" attribute at the head of the HTML page, which is used to define the target DTD used to parse

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Copy after login


Parsing SGML is a pain now, so XML was created to make things better. XML uses SGML, for example: in SGML you have to use start and end tags, but in XML you can have auto-closing end tags.

XHTML was created from XML and is used in HTML4.0. You can refer to the XML DTD shown in the code snippet below

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Copy after login



40 HTML5 interview questions (with answers)
##In short, SGML is the parent class of all types, Old HTML utilizes SGML, HTML4.0 uses XHTML, which is derived from XML


What is HTML5?

HTML5 is the latest HTML standard, its main goal is to provide all content without the need for any additional plug-ins like flash, silverlight, etc. These contents come from animation, video, rich GUI, etc.


HTML5 is a collaborative output between the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG)


Why we don’t need DTD (Document Type Definition) in HTML5 Definition))?

HTML5 does not use SGML or XHTML. It is a brand new thing, so you do not need to refer to the DTD. For HTML5, you only need to place the following document type code to tell the browser to recognize that this is an HTML5 document



Will HTML5 still work if I don't put in ?

No, the browser will not recognize it as an HTML document, and the HTML5 tags will not work properly



Which browsers support HTML5?

Almost all browsers Safari, Chrome, Firefox, Opera, and IE support HTML5



What is the difference between the page structure of HTML5 and HTML4 or earlier HTML?

A typical WEB page includes a header, footer, navigation, center area, and sidebar. Now if we want to render this content in an HTML area in HTML4, we might want to use the p tag.


But in HTML5 by creating element names for these areas it makes them clearer and makes your HTML more readable


40 HTML5 interview questions (with answers)
The following is the structure of the page More details of HTML5 elements:

: Represents the header data of HTML