Summary of front end interview questions - HTML (under continuous update)

JavaScript language 2020-11-13 05:04:26
summary end interview questions html

Summary of front-end interview questions ——HTML( Ongoing update )

1. What is? HTML?

HTML:HyperText Markup Language Hypertext markup language

2.XHTML and HTML What's the difference?

HTML It's a basic WEB Web design language ,XHTML It's based on XML The markup language of

3. Briefly, you're right HTML Semantic understanding ?

html Semantic makes the content of the page structured , Structure is clearer , Easy for browsers 、 Search engine analysis ;

4. What are the three layers of the browser , What are the differences , What is the role ?

Browser page composition : The structure layer 、 The presentation layer 、 Behavior layer
Namely :HTML、CSS、JavaScript
effect :HTML Realize page structure ,CSS Complete the performance and style of the page ,JavaScript Realize some client functions and services .

5.Doctype effect ? How to distinguish strict pattern from hybrid pattern ?

(1) effect : The parser used to tell the browser what document standard to parse the document with .
(2) distinguish : If HTML The document contains the complete form of DOCTYPE, Well, he usually presents it in a standard way .DOCTYPE Does not exist or the format is not correct can cause the document to have mixed mode rendering .

6.Quirks What is the pattern ? It and Standards What's the difference between patterns

difference :
There will be a general layout 、 The difference between style parsing and script execution .
The box model : stay W3C In the standard , If you set the width and height of an element , Refers to the width and height of the content of the element , And in the Quirks In mode ,IE The width and height of also include padding and border.
Set the height and width of the elements in the row : stay Standards In mode , Set up the elements in the wait line wdith and height It's not going to work , And in the quirks In mode , Will take effect .
use margin:0 auto Set horizontal center : Use margin:0 auto stay standards In mode, you can center elements horizontally , But in quirks In mode, it fails .

7. When the page is importing styles , Use link and @import What's the difference? ?

(1) The effect is different :link Belong to XHTML label , In addition to loading CSS Outside , It can also be used to define RSS, Definition rel Connection properties and so on ;
and @import yes CSS Provided , Can only be used to load CSS;
(2) Loading is different : When the page is loaded ,link Will be loaded at the same time , and @import Refer to the CSS It will wait until the page is loaded ;
(3) Compatible with different :import yes CSS2.1 Proposed , Only in IE5 The above can be identified , and link yes XHTML label , No compatibility problem ;

8. What are the picture formats that you know about web page production ?

Webp:WebP Format , Google (google) A kind of image format designed to speed up image loading is developed .
And can save a lot of server bandwidth resources and data space .Facebook Ebay And other well-known websites have begun to test and use WebP Format .
Apng: yes PNG Bitmap animation extension of , Can achieve png Format dynamic picture effect , It is expected that GIF Become the next generation of dynamic graph standards .

9. Text mark

1. Special characters
1.  Represents a space
2.&lt; It means a <
3.&gt; It means a >
4.&copy; Means copyright
5.&yen; ¥
2. Text style
1.<b></b> : In bold
2.<i></i> : Italics
3.<u></u> : Underline
4.<s></s> : Delete line
5.<sup></sup> : Superscript
6.<sub></sub> : Subscript

10. What is anchor point

 Anchor is a mark in the web page , You can jump to the mark location via hyperlinks .
1. Define anchors
1. Use a Of the tag name Attributes define anchors
<a name=" Anchor name "></a>
2. Using arbitrary tags id Attributes define anchors
<ANY id=" Anchor name "></ANY>
2. Link to anchor
<a href="# Anchor name "> This page </a>
<a href="url# Anchor name "> Other pages </a>

11.div+css What are the advantages of the layout of ?

(1) It's more convenient to change the version Just change css file .
(2) Faster page loading 、 Structured and clear 、 The page is simple .
Separation of performance from structure .
(3) Easy to optimize (seo) Search engines are more friendly , It's easier to get to the top .

12. What are the elements in the line ? What are the block level elements ? empty (void) Elements have those ?

First :CSS Specifications stipulated , Each of the elements display attribute , Determine the type of the element , Each element has a default display value , Such as div Of display The default value is “block”, Then for “ Block level ” Elements ;span Default display The property value is “inline”, yes “ inline ” Elements .
(1) The elements in the row are :a b span img input select
(2) Block level elements are :div p ul ol li dl dt dd h1-h6
(3) Common empty elements :br- Line break ,hr- Horizontal split line ;

13.iframe There are those shortcomings ?

1.iframe Will block the main page Onload event , It will affect the parallel loading of the page ;
2. Search engine search programs can't read this kind of page , It's not good for SEO;
improvement : adopt javascript Dynamic to iframe add to src Property value , In this way, we can avoid the above two problems .

14.Label What is the role of ? How does it work ?

label Tags define the relationship between form controls , When the user selects the label , The browser automatically turns the focus to the form control associated with the label .

15. Several ways to hide elements

(4)position:absolute; left:-10000px;

16. Briefly src And href The difference between .

src Used to replace the current element ,href Used to establish a connection between the current document and the referenced resources .

17. Implementation does not use border Draw 1px High line , In different browser standard mode and weird mode can keep the same effect

18. How to add hyperlinks to background pictures

<div class="swiper-slide "
style='background:#dedede url() no-repeat center center;background-size:contain'>
<a class="banner-a"rel="nofollow" href="#"></a>
height: 8rem;
display: inline-block;

19. What are the ways to clear the float ?

The first one is :clear:both

Add an empty... To the parent element clear Of div( Same level with floating children ), Then add the property value to this class clear:both; You can clear the float .

The second kind :overflow:hidden

Add... To the style of the parent element overflow: hidden; You can also clear floats , as follows css Code , But it is not recommended to use this method ,overflow: hidden; Another meaning is to hide the excess , If you don't handle it well, it will cause trouble to the page .

The third kind of :clearfix( Recommended )

1. Add... To the parent set element class name clear-fix
2. Write pseudo class style

.clear-fix::after {
display: block;
<div class="header-line clear-fix">
<div class="header-logo">
<a class="logo"href=""> Pattern scheme </a>
Front end development tutorial buckle qun:767273102 , From the most basic HTML+CSS+JavaScript.jQuery,Ajax,node,angular Wait until the mobile end HTML5 The actual combat information of the project has been sorted out
本文为[JavaScript language]所创,转载请带上原文链接,感谢

  1. [front end -- JavaScript] knowledge point (IV) -- memory leakage in the project (I)
  2. This mechanism in JS
  3. Vue 3.0 source code learning 1 --- rendering process of components
  4. Learning the realization of canvas and simple drawing
  5. gin里获取http请求过来的参数
  6. vue3的新特性
  7. Get the parameters from HTTP request in gin
  8. New features of vue3
  9. vue-cli 引入腾讯地图(最新 api,rocketmq原理面试
  10. Vue 学习笔记(3,免费Java高级工程师学习资源
  11. Vue 学习笔记(2,Java编程视频教程
  12. Vue cli introduces Tencent maps (the latest API, rocketmq)
  13. Vue learning notes (3, free Java senior engineer learning resources)
  14. Vue learning notes (2, Java programming video tutorial)
  15. 【Vue】—props属性
  16. 【Vue】—创建组件
  17. [Vue] - props attribute
  18. [Vue] - create component
  19. 浅谈vue响应式原理及发布订阅模式和观察者模式
  20. On Vue responsive principle, publish subscribe mode and observer mode
  21. 浅谈vue响应式原理及发布订阅模式和观察者模式
  22. On Vue responsive principle, publish subscribe mode and observer mode
  23. Xiaobai can understand it. It only takes 4 steps to solve the problem of Vue keep alive cache component
  24. Publish, subscribe and observer of design patterns
  25. Summary of common content added in ES6 + (II)
  26. No.8 Vue element admin learning (III) vuex learning and login method analysis
  27. Write a mini webpack project construction tool
  28. Shopping cart (front-end static page preparation)
  29. Introduction to the fluent platform
  30. Webpack5 cache
  31. The difference between drop-down box select option and datalist
  32. CSS review (III)
  33. Node.js学习笔记【七】
  34. Node.js learning notes [VII]
  35. Vue Router根据后台数据加载不同的组件(思考-&gt;实现-&gt;不止于实现)
  36. Vue router loads different components according to background data (thinking - & gt; Implementation - & gt; (more than implementation)
  37. 【JQuery框架,Java编程教程视频下载
  38. [jQuery framework, Java programming tutorial video download
  39. Vue Router根据后台数据加载不同的组件(思考-&gt;实现-&gt;不止于实现)
  40. Vue router loads different components according to background data (thinking - & gt; Implementation - & gt; (more than implementation)
  41. 【Vue,阿里P8大佬亲自教你
  42. 【Vue基础知识总结 5,字节跳动算法工程师面试经验
  43. [Vue, Ali P8 teaches you personally
  44. [Vue basic knowledge summary 5. Interview experience of byte beating Algorithm Engineer
  45. 【问题记录】- 谷歌浏览器 Html生成PDF
  46. [problem record] - PDF generated by Google browser HTML
  47. 【问题记录】- 谷歌浏览器 Html生成PDF
  48. [problem record] - PDF generated by Google browser HTML
  49. 【JavaScript】查漏补缺 —数组中reduce()方法
  50. [JavaScript] leak checking and defect filling - reduce() method in array
  51. 【重识 HTML (3),350道Java面试真题分享
  52. 【重识 HTML (2),Java并发编程必会的多线程你竟然还不会
  53. 【重识 HTML (1),二本Java小菜鸟4面字节跳动被秒成渣渣
  54. [re recognize HTML (3) and share 350 real Java interview questions
  55. [re recognize HTML (2). Multithreading is a must for Java Concurrent Programming. How dare you not
  56. [re recognize HTML (1), two Java rookies' 4-sided bytes beat and become slag in seconds
  57. 【重识 HTML ,nginx面试题阿里
  58. 【重识 HTML (4),ELK原来这么简单
  59. [re recognize HTML, nginx interview questions]
  60. [re recognize HTML (4). Elk is so simple