1.2021 360 front-end engineer
Which of the following statements about tags in HTML5 is false
A
not case sensitive
B
upper and lower case can be mixed
C
Some tags can be self-closing
D
All tags can omit the end closing tag
The correct answer is: D
Analysis: D option, <script> and <table> tags cannot omit the closing tag
2.2021 360 front-end engineer
In the HTMLDOM tree structure, the parent node of <body> is ()
A
<head>
B
<html>
C
<title>
D
<frame>
Correct answer: B
Parse:
The <html> node has no parent; it is the root node
The parent node of <head> and <body> is the <html> node
3.2021 360 front-end engineer
In the HTMLDOM tree structure, the parent node of <body> is ()
A
<head>
B
<html>
C
<title>
D
<frame>
Correct answer: B
Official analysis:
- The <html> node has no parent; it is the root node
- The parent node of <head> and <body> is the <html> node
4. 2021 360 front-end engineer
In HTML5, which element is used to combine heading elements?
A
<group>
B
<header>
C
<headings>
D
<hgroup>
correct answer: D
Parse:
The <hgroup> element is used to group heading elements, for example:
<hgroup>
<h1><a href="/">Mini Apps</a></h1>
<h2>Web applications for iPhoneplatforms</h2>
</hgroup>If you only have one heading element (one of h1-h6), you don't need <hgroup>. . When there is one or more than one title and element, apply <hgroup> to surround them. When you have a heading with subtitles or other metadata related to the section or article, put the <hgroup> and metadata into a single <header> element container.
5.2021 Baidu front-end engineer
What is the height of the div rendered by the following code in the browser
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<html lang=
"en"
>
<head>
<meta charset=
"UTF-8"
>
<meta name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
>
<title>Document</title>
<style>
.heightTest {
height: 1000px;
min-height: 500px;
max-height: 300px;
}
</style>
</head>
<body>
<div class=
"heightTest"
></div>
</body>
</html>
A
1000px
B
500px
C
300px
D
browser error, exception
Correct answer: B
Official analysis:
1. When max-height and height are used together, take a small value.
2. When min-height and height are used together, take the larger value.
3. When min-height, height and max-height are used together:
height > max-height > min-height,取max-height
height > min-height > manx-height ,取min-height
min-height > height > max-height ,取min-height
min-height > max-height > height,取min-height
max-height > height > min-height, 取 height
max-height > min-height > height, 取 min-height