你不可错过的前端面试题(一)

1. <keygen> 是正确的HTML5标签吗?

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

2. <bdo> 标签是否可以改变文本方向?

<bdo>标签覆盖默认的文本方向。可以改变文本方向。

可以改变文本方向

3. 下列HTML代码是否正确?

HTML

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

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

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

The HTML Small Element (<small>) 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.

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

不影响。

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.

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

<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.

7. 下列代码中scope 属性是做什么的?

HTML

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

8. HTML5 支持块级超链接吗?

HTML

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

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

HTML

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

HTML

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

HTML

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

HTML

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

HTML

若有错误,望大家指出,谢谢(〃'▽'〃)

阅读更多

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值