一键导入
html-spec-review
Guidelines for writing and reviewing the HTML standard. Used to enforce style, formatting, prose correctness, and developer's edition annotations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guidelines for writing and reviewing the HTML standard. Used to enforce style, formatting, prose correctness, and developer's edition annotations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | html-spec-review |
| description | Guidelines for writing and reviewing the HTML standard. Used to enforce style, formatting, prose correctness, and developer's edition annotations. |
This skill provides the official guidelines, prose style conventions, and formatting constraints for writing, editing, and reviewing the WHATWG HTML standard. Refer to this skill when generating new spec text, reviewing pull requests, or updating existing sections of the HTML specification.
<i data-x="...">\ntext</i> is incorrect).<li>, <dt>, <dd>):
<li> must wrap its text content in a <p> (except in <ul class="brief">).<li><p>Text</p></li> on the same line if possible, or indent nested blocks.<ol> or <ul> (except brief lists):
<li> is indented by 3 spaces.<li> (including nested <p> or <p class="note"> tags, or subsequent wrapped lines of text) must be indented by 4 spaces.<var> tags inside Web IDL blocks.<ul class="brief">): Use for simple/short lists. Items must not wrap content in a <p> tag. No blank lines between items.<dl class="switch">): Use for complex branch logic. Sibling <dt> conditions map to a single <dd> consequence/action.<table>): Use only for multi-dimensional data (e.g., event tables, element properties). Do not use for simple steps or branching.<div algorithm> (no assigned value). Include the preamble (name, return type) inside it. Do not indent the container's contents.<var> elements to scope them. Multi-algorithm scopes can use <div var-scope>. If a variable is only used once, add the ignore attribute: <var ignore>x</var>.<span> (e.g., <span>Assert</span>:).this keyword in a <span> (e.g., <span>this</span>).<i>arg</i>), not <var>.attribute getter/setter steps are to [do something]." or "The [...] getter steps are:" followed by a list.[value1] if [condition]; otherwise [value2] (note the semicolon before otherwise, and no comma after unless followed by a verb phrase)."butt". Reference in prose as "<code data-x="">butt</code>".<dfn data-x="...">"no-referrer"</dfn>. Reference as <span data-x="...">"no-referrer"</span>.<span>Disabled</span>).<code data-x="">text/html</code>").behavior, color) and Oxford commas in listings.Let <var>list</var> be « "a", "b" ».Let « <var>a</var>, <var>b</var> » be <var>list</var>.list[0] and size (never length or count).append, extend A with B, prepend, replace ... within ..., insert ... into ... before [index], remove ... from ..., contains, is empty.Let <var>map</var> be «[ "a" → 1 ]». (use right arrow →).map["key"] or map["key"] with default 0. Check existence with exists.set map[key] to value, remove map[key], clear map, get the keys, get the values, map's size.Let <var>x</var> be a struct whose property is value.Let <var>x</var> be (value1, value2). Access by field name or index (x[0]).For each <var>item</var> of <var>items</var>: (use of, not in).For each <var>key</var> → <var>value</var> of <var>map</var>:While [condition]:. Control with continue and break.<dl class="domintro"> provides developer-friendly Web IDL explanations since IDL/normative steps are hidden in the Developer's Edition.
<pre class="idl">) and before implementation algorithms. Do not mark it with w-nodev.<dt>):
<var> for placeholder names.<span subdfn data-x="dom-IDL-name"> on the first introduction of a member to register it. Use normal <span> for subsequent signatures.<dd>):
Editorial: clean up markup of [Section]).The HTML specification compiles into a Living Standard and a Developer's Edition (which filters out low-level implementer-only details).
<div class="example">), and <dl class="domintro"> blocks.w-nodev / w-dev: Use to exclude/include elements from/in the Developer's Edition.
w-dev or w-nodev attributes inside an ancestor already marked w-nodev.subdfn: If a term is defined inside an omitted Web IDL block, add subdfn on the corresponding <span data-x="..."> definition so it stays defined in the Developer's Edition.