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

[zh-cn] improve 'html examples guidelines' #17037

Merged
merged 4 commits into from
Nov 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Prettier 格式化所有代码并保持风格一致。尽管如此,你仍需

## 属性

你应该把所有的属性值放在双引号之间。自从 HTML5 允许省略引号后,人们很轻易地就会这样做,但是添加引号能让标记更加简洁和易读。例如,这样就比较好:
你应该把所有的属性值放在双引号之间。自从 HTML5 允许省略引号后,人们会很轻易地省略引号,但是添加引号能让标记更加简洁和易读。例如,这样就比较好:

```html example-good
<img src="images/logo.jpg" alt="A circular globe icon" class="no-border" />
Expand Down Expand Up @@ -103,7 +103,7 @@ Prettier 格式化所有代码并保持风格一致。尽管如此,你仍需

## Class 和 ID 名称

使用语义化的 class/ID 名称,并且使用连字符分隔多个单词({{Glossary("kebab_case", "短横线命名法")}})。不要使用{{Glossary("camel_case", "骆驼式命名法")}}。例如:
使用语义化的 class/ID 名称,并且使用连字符分隔多个单词({{Glossary("kebab_case", "短横线命名法")}})。不要使用{{Glossary("camel_case", "驼峰式命名法")}}。例如:

```html example-good
<p class="editorial-summary">其他内容</p>
Expand Down