# 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>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://atit.gitbook.io/html/index/living-standard-main.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
