HTML5: which is better - using a character entity vs using a character directly?

后端 未结 5 2195
忘掉有多难
忘掉有多难 2021-02-01 15:42

I\'ve recently noticed a lot of high profile sites using characters directly in their source, eg:

“Hi there”

Rather than:

5条回答
  •  耶瑟儿~
    2021-02-01 15:58

    It is better to use characters directly. They make for: easier to read code.

    Google's HTML style guide advocates for the same. The guide itself can be found here: Google HTML/CSS Style guide.

提交回复
热议问题