> For the complete documentation index, see [llms.txt](https://atit.gitbook.io/html/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://atit.gitbook.io/html/index/living-standard-main.md).

# Living Standard Main

すぐに使いそうな基本仕様キャッチアップをかいつまみ

### 基本ルール

* DOCTYPE => `<!DOCTYPE html>`
* DOCTYPE宣言を作成できない場合 = `<!DOCTYPE html SYSTEM "about:legacy-compat">`

### 厳格な仕様

* HTTPレスポンスヘッダ
  * XML = application/xhtml+xml、application/xml又はtext/xml
  * HTML = `text/html`
  * ただしエラーは出ない模様で守らない傾向にもある

### 強い禁則

* `document.write`と`document.writeln`は使用禁止

### 要注意

* *`br`要素は、段落構造を維持したまま段落を複数行に分割する特殊な要素であり、`br`要素で改行されているからといって、別々の段落だと扱ってはならない。*
* -> 再解釈：文章構造として、段落は`p`タグで行う。

### *ど*ちらでも良い

* svg要素及びmath要素の`xmlns属性`

## 大きなアップデート

### Picture

* *`<picture>` 要素は、画像リソースの読み込みを宣言的に行う仕組み*
* レスポンシブ/ユーザー環境最適化の対応のための仕様が大きく変わった

実装例

```html
<picture>
  <source 
    media="(min-width: 650px)"
    srcset="images/kitten-stretching.png">
  <source 
    media="(min-width: 465px)"
    srcset="images/kitten-sitting.png">
  <img 
    src="images/kitten-curled.png" 
    alt="a cute kitten">
</picture>  
```

* [ ] 次回さらに詳細テストを行う
* [ ] Gatsbyは半自動でこの実装が行われるので、再度[自身の実装](https://github.com/BoxPistols/post-gatsby)チェック

*参照*

{% embed url="<http://mtrootyy.web5.jp/htmllint/html5memo/0kyotu.html>" %}

{% embed url="<https://www.html5rocks.com/ja/tutorials/responsive/picture-element>" %}
