web前端笔试题
Q1:<keygen>
是正确的HTML5标签吗?
A:是。
<keygen>
标签规定用于表单的密钥对生成器字段。当提交表单时,私钥存储在本地,公钥发送到服务器。是HTML5 标签。
Q2:<bdo>
标签是否可以改变文本方向?
A:可以。
<bdo>
标签覆盖默认的文本方向。
<bdo dir="rtl">Here is some text</bdo>
Q3:下列HTML代码是否正确?
<figure>
<img src="https://www.php.cn/myimage.jpg" alt="My image">
<figcaption>
<p>This is my self portrait.</p>
</figcaption>
</figure>
A:正确
<figure>
标签规定独立的流内容(图像、图表、照片、代码等等)。figure 元素的内容应该与主内容相关,但如果被删除,则不应对文档流产生影响。使用<figcaption>
元素为figure添加标题(caption)。
Q4:哪种情况下应该使用small标签?当你想在h1 标题后创建副标题?还是当在footer里面增加版权信息?
A:small标签一般使用场景是在版权信息和法律文本里使用,也可以在标题里使用标注附加信息(bootstrap中可见),但不可以用来创建副标题。
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 <h1> tags is fine, as long as you're not abusing it (like sticking your whole page in an <h1> 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 <h1>'s, then go for it.
摘自:http://www.quora.com/Does-using-multiple-h1-tags-on-a-page-affect-search-engine-rankings
Q6:如果你有一个搜索结果页面,你想高亮搜索的关键词。什么HTML 标签可以使用?
A:<mark>
标签表现高亮文本。
The HTML
<mark>
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="https://www.php.cn/div-tutorial-491129.html#">
<h1>Hello</h1>
<p>I am some text</p>
</a>
</article>
A:支持。
HTML5中<a> 元素表现为一个超链接,支持任何行内元素和块级元素。
Q9:当下列的HTML代码加载时会触发新的HTTP请求吗?
<img src="https://www.php.cn/mypic.jpg" alt="My picture">
A:会哇
Q10:当下列的HTML代码加载时会触发新的HTTP请求吗?
<div style="display: none;">
<img src="https://www.php.cn/mypic.jpg" alt="My photo">
</div>
A:会!
Q11:main1.css一定会在alert('Hello world')被加载和编译吗?
<head>
<link href="https://www.php.cn/main1.css" rel="stylesheet">
<script>
alert('Hello World');
</script>
</head>
A:是!
Q12:在main2.css获取前main1一定必须被下载解析吗?
<head>
<link href="https://www.php.cn/main1.css" rel="stylesheet">
<link href="https://www.php.cn/main2.css" rel="stylesheet">
</head>
A:no!
Q13:在Paragraph 1加载后main2.css才会被加载编译吗?
<head>
<link href="https://www.php.cn/main1.css" rel="stylesheet">
</head>
<body>
<p>Paragraph 1</p>
<p>Paragraph 2</p>
<link href="https://www.php.cn/main2.css" rel="stylesheet">
</body>
A:yes!
这篇好文章是转载于:学新通技术网
- 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
- 本站站名: 学新通技术网
- 本文地址: /boutique/detail/tanfbiig
-
photoshop保存的图片太大微信发不了怎么办
PHP中文网 06-15 -
Android 11 保存文件到外部存储,并分享文件
Luke 10-12 -
word里面弄一个表格后上面的标题会跑到下面怎么办
PHP中文网 06-20 -
《学习通》视频自动暂停处理方法
HelloWorld317 07-05 -
微信公众号没有声音提示怎么办
PHP中文网 03-31 -
photoshop扩展功能面板显示灰色怎么办
PHP中文网 06-14 -
excel下划线不显示怎么办
PHP中文网 06-23 -
怎样阻止微信小程序自动打开
PHP中文网 06-13 -
excel打印预览压线压字怎么办
PHP中文网 06-22 -
photoshop蒙版画笔没反应怎么办
PHP中文网 06-24