跳到内容

使用情况

您如何使用 HTML。

浏览器互操作性

There are few things more frustrating than knowing a new browser API would solve your problem perfectly, but that you can't use it because of poor support.

Thankfully, with initiatives like Interop one can hope that the Popover API and Anchor Positioning soon join the ranks of the features we all use without giving it a second thought.

0%
17%
33%
50%
67%
83%
1

2

3

4

5

6

Safari issues

7

<select>

8

<input type="date">

9

10

Customized built-in elements

0%
17%
33%
50%
67%
83%
受访者百分比
由于浏览器差异或缺乏支持,您无法使用哪些现有 HTML 功能或浏览器 API?
(自由提问)

While poor browser support is certainly a problem, even well-supported features can see lower usage if they are hard to customize to developer needs, or just plain hard to master.

0%
17%
35%
52%
69%
86%
1

<select>

2

<input type="date">

3

4

5

6

7

<select multiple>

8

9

Form inputs

10

Autocomplete

11

Dropdown menus

12

<input type="checkbox">

13

其他答案

匹配“其他答案”的答案 260
0%
17%
35%
52%
69%
86%
受访者百分比
由于其他原因,您无法使用哪些现有的 HTML 功能或浏览器 API?
(自由提问)

缺失的元素

It might seem weird that omnipresent UI controls such as tabs or datatables still don't have a corresponding native HTML element.

But getting these complex behaviors right while accounting for all edge cases takes time, so for now all we can do is wait and hope these elements make their way to the browser one day.

0%
10%
20%
31%
41%
51%
1

数据表(带排序、筛选等功能)

1,798
2

选项卡(Tabs)

1,419
3

开关(Switch / Toggle)

1,114
4

骨架屏/加载占位符

977
5

上下文菜单/右键菜单

953
6

轮播图(Carousel)

917
7

无限滚动

844
8

手风琴(Accordion)

563
9

图片缩放

439
10

分段按钮(Segmented Button)

267
0%
10%
20%
31%
41%
51%
受访者百分比
如果可以在 HTML 中添加 3 个元素,它们是什么?

HTML/CSS 与 JavaScript/TypeScript 之间的平衡

We still spend far more time writing JavaScript (or TypeScript) than anything else. While there's nothing wrong with that, the web platform as a whole's ongoing progress will hopefully help balance things out a bit in the near future.

0%
6%
12%
18%
24%
30%
1

100% HTML/CSS

46
2

1

261
3

2

368
4

3

273
5

50%–50%

617
6

5

494
7

6

1,118
8

7

470
9

100% JS

33
0%
6%
12%
18%
24%
30%
受访者百分比
您如何分配编写 HTML/CSS 和 JavaScript(或 TypeScript)代码的时间?

HTML 使用情况

While “classic” use cases like blogs or homepages still represent a sizable part of the modern web developer's workload, the largest chunk by far is now web apps – which in turn explains why the web platform has been adapting to this new state of things.

0%
17%
33%
50%
67%
84%
1

网络应用

3,031
2

博客或其他文本密集型网站

2,048
3

营销网站和登录页

1,701
4

设计系统

1,390
5

电子邮件

1,038
6

桌面应用

767
7

移动应用程序

705
8

印刷文件

493
9

E-Commerce sites

10

10
11

其他答案

92
0%
17%
33%
50%
67%
84%
受访者百分比
What do you use HTML for?

Programming & Technical Tools topped the rankings, which makes sense for a developer-focused survey.

It's also interesting to note that E-commerce came in third, as this is a sector that faces the double challenge of building highly performant sites that also need to feature complex user interactions.

0%
7%
14%
21%
28%
35%
1

编程和技术工具

1,162
2

咨询服务

838
3

电子商务与零售

588
4

教育

474
5

金融

395
6

营销/销售/分析工具

342
7

娱乐

300
8

新闻、媒体和博客

281
9

卫生保健

230
10

政府

225
0%
7%
14%
21%
28%
35%
受访者百分比
你在哪个行业工作?
💡
科学证明,在Twitter、Facebook或电子邮件上分享这项调查, 可以让你的 JavaScript 性能提高15%。
Frontend Masters

Frontend Masters

Advance Your Skills with In-Depth, Modern Front-End Engineering Courses
感谢合作伙伴对我们的支持! 了解更多。