Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[html] 第39天 title与h1、b与strong、i与em的区别分别是什么? #144

Open
haizhilin2013 opened this issue May 24, 2019 · 3 comments
Labels
html html

Comments

@haizhilin2013
Copy link
Collaborator

第39天 title与h1、b与strong、i与em的区别分别是什么?

@haizhilin2013 haizhilin2013 added the html html label May 24, 2019
@git710
Copy link

git710 commented May 25, 2019

  • title标签写在body里面不会被渲染,只能写在head里面,对网站SEO比较重要
  • h1标签写在body里面,但是写在head里(不推荐),渲染的时候会自动渲染到body里面去
  • b标签与strong标签在表现上是一样的,都自带font-weight: bold属性
  • i标签与em标签在表现上是一样的,都自带font-style: italic属性
  • b标签与i标签是物理标记,告诉浏览器以何种格式显示文字
  • strong标签与em标签是逻辑标记,逻辑元素告诉浏览器这些文字有怎么样的重要性
  • b: bold ;
  • strong: strong ;
  • i: Italic ;
  • em: emphasize;

@Konata9
Copy link

Konata9 commented Sep 17, 2019

关于 titleh1title 是网页的标题。主要面向的对象是搜索引擎和通过搜索结果过来的人(面向外人,可以理解为报纸首页的标题)。而 h1 是网页内部的标题,是给已经进到页面的人看的(可以理解为报纸某个版面的大标题)。从人类的语境上来理解,两者并没有差别。

bstrong 的效果人眼上是无法区分的。在语义上,b 仅表示加粗既装饰用,我们应该使用 CSS 而不应该使用 b;而 strong 则表示被包围的内容很重要,是语气上的感觉。对于搜索引擎来说,会把 bstrong 视为同一含义。因此我们在使用上需要注意。

iem 的区别类似 bstrong 的区别。i 用于斜体展示,我们应该使用 CSS 而不应该使用 i;而 em 则是对内容的强调,但程度没有 strong 那么高。同样,对搜索引擎来说,两者是没有区别的。

参考文章:
title タグと h1 タグは完全同一がいい?
文字を強調するタグ strong・b・em・i の違いと SEO 効果

@MrZ2019
Copy link

MrZ2019 commented Oct 29, 2020

关于 title 和 h1,title 是网页的标题。主要面向的对象是搜索引擎和通过搜索结果过来的人(面向外人,可以理解为报纸首页的标题)。而 h1 是网页内部的标题,是给已经进到页面的人看的(可以理解为报纸某个版面的大标题)。从人类的语境上来理解,两者并没有差别。

b 与 strong 的效果人眼上是无法区分的。在语义上,b 仅表示加粗既装饰用,我们应该使用 CSS 而不应该使用 b;而 strong 则表示被包围的内容很重要,是语气上的感觉。对于搜索引擎来说,会把 b 和 strong 视为同一含义。因此我们在使用上需要注意。

i 与 em 的区别类似 b 和 strong 的区别。i 用于斜体展示,我们应该使用 CSS 而不应该使用 i;而 em 则是对内容的强调,但程度没有 strong 那么高。同样,对搜索引擎来说,两者是没有区别的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
html html
Projects
None yet
Development

No branches or pull requests

4 participants