https://github.com/dabeng/html-basics
https://github.com/dabeng/html-basics
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dabeng/html-basics
- Owner: dabeng
- License: mit
- Created: 2019-07-05T02:04:19.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-11-27T02:15:20.000Z (over 5 years ago)
- Last Synced: 2025-01-28T02:22:46.352Z (over 1 year ago)
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HTML
## Miscellaneous
### Space
```html
```
半角的不断行的空白格(推荐使用)。这是我们使用最多的空格,也就是按下space键产生的空格。在HTML中,如果你用空格键产生此空格,空格是不会累加的(只算1个)。要使用html实体表示才可累加。该空格占据宽度受字体影响明显而强烈。在inline-block布局中会搞些小破坏,在两端对齐布局中又是不可少的元素。
```html
```
半角的空格。此空格有个相当稳健的特性,就是其占据的宽度正好是1/2个中文宽度,而且基本上不受字体影响。
```html
```
全角的空格。此空格也有个相当稳健的特性,就是其占据的宽度正好是1个中文宽度,而且基本上不受字体影响。
## Semantic
### Basic HTML structure of classic website layout
```html
-
-
-
```
### <section> vs <div>
` tag has a semantic meaning unlike . semantic tags describe their meaning both to the developer and the browser. Basically, the tag defines sections in a document, such as chapters, headers, footers, or any other sections of the document.`
`On the other hand, has no meaning, typically used for grouping elements and styling them via CSS.If you just need to group content together for styling purposes you should use a element rather than a .`
### <section> vs <article>
`The tag should contain a piece of self-contained content that could be distributed outside the context of the page. This includes things like news articles, blog posts, or user comments.`
`The element is used to represent a group of related content. This is similar to the purpose of an element with the main difference being that the content within a element doesn’t necessarily need to make sense out of the context of the page.`
## Template
## ARIA