web前端笔试题库之HTML篇

青灯夜游
发布: 2022-04-21 11:56:40
转载
4440人浏览过

总结了一些web前端面试(笔试)题分享给大家,本篇文章就先给大家分享html部分的笔试题(附答案),大家可以自己做做,看看能答对几个!

web前端笔试题库之HTML篇

相关推荐:《web前端笔试题库之CSS篇》

Q1: 是正确的HTML5标签吗?

A:是。

 标签规定用于表单的密钥对生成器字段。当提交表单时,私钥存储在本地,公钥发送到服务器。是HTML5 标签。

立即学习前端免费学习笔记(深入)”;

Q2: 标签是否可以改变文本方向?

A:可以。

标签覆盖默认的文本方向。

<bdo dir="rtl">Here is some text</bdo>
登录后复制

Q3:下列HTML代码是否正确?

<figure>
    @@##@@
    <figcaption>
        <p>This is my self portrait.</p>
    </figcaption>
</figure>
登录后复制

A:正确

标签规定独立的流内容(图像、图表、照片、代码等等)。figure 元素的内容应该与主内容相关,但如果被删除,则不应对文档流产生影响。使用
元素为figure添加标题(caption)。

Q4:哪种情况下应该使用small标签?当你想在h1 标题后创建副标题?还是当在footer里面增加版权信息?

A:small标签一般使用场景是在版权信息和法律文本里使用,也可以在标题里使用标注附加信息(bootstrap中可见),但不可以用来创建副标题。

The HTML Small Element () makes the text font size one size smaller (for example, from large to medium, or from small to x-small) down to the browser's minimum font size. In HTML5, this element is repurposed to represent side-comments and small print, including copyright and legal text, independent of its styled presentation.

Q5:在一个结构良好的web网页里,多个h1标签会不利于SEO吗?

A:不影响。

According to Matt Cutts (lead of Google's webspam team and the de facto expert on these things), using multiple

tags is fine, as long as you're not abusing it (like sticking your whole page in an

and using CSS to style it back to normal size). That would likely have no effect, and might trigger a penalty, as it looks spammy.

If you have multiple headings and it would be natural to use multiple

's, then go for it.

摘自:http://www.quora.com/Does-using-multiple-h1-tags-on-a-page-affect-search-engine-rankings

Q6:如果你有一个搜索结果页面,你想高亮搜索的关键词。什么HTML 标签可以使用?

A: 标签表现高亮文本。

The HTML Element represents highlighted text, i.e., a run of text marked for reference purpose, due to its relevance in a particular context. For example it can be used in a page showing search results to highlight every instance of the searched for word.

Q7:下列代码中scope 属性是做什么的?

<article>
    <h1>Hello World</h1>
    <style scoped>
        p {
            color: #FF0;
        }
    </style>
    <p>This is my text</p>
</article>
<article>
    <h1>This is awesome</h1>
    <p>I am some other text</p>
</article>
登录后复制

A:scoped 属性是一个布尔属性。如果使用该属性,则样式仅仅应用到 style 元素的父元素及其子元素。

Q8:HTML5 支持块级超链接吗?例如:

<article>
    <a href="#">
        <h1>Hello</h1>
        <p>I am some text</p>
    </a>
</article>
登录后复制

A:支持。

HTML5中 元素表现为一个超链接,支持任何行内元素和块级元素。

Q9:当下列的HTML代码加载时会触发新的HTTP请求吗?

@@##@@
登录后复制

A:会哇

Q10:当下列的HTML代码加载时会触发新的HTTP请求吗?

<div style="display: none;">
    @@##@@
</div>
登录后复制

A:会!

Q11:main1.css一定会在alert('Hello world')被加载和编译吗?

<head>
    <link href="main1.css" rel="stylesheet">
    <script>
        alert('Hello World');
    </script>
</head>
登录后复制

A:是!

Q12:在main2.css获取前main1一定必须被下载解析吗?

<head>
    <link href="main1.css" rel="stylesheet">
    <link href="main2.css" rel="stylesheet">
</head>
登录后复制

A:no!

Q13:在Paragraph 1加载后main2.css才会被加载编译吗?

<head>
    <link href="main1.css" rel="stylesheet">
</head>
<body>
    <p>Paragraph 1</p>
    <p>Paragraph 2</p>
    <link href="main2.css" rel="stylesheet">
</body>
登录后复制

A:yes!

【相关推荐:html视频教程web前端

web前端笔试题库之HTML篇web前端笔试题库之HTML篇web前端笔试题库之HTML篇

以上就是web前端笔试题库之HTML篇的详细内容,更多请关注php中文网其它相关文章!

HTML速学教程(入门课程)
HTML速学教程(入门课程)

HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!

下载
来源:github网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号