含义
A markup keyword wrapped in angle brackets that tells the browser what kind of element to create.
如何指定
Use the tag name when the target is a broad element type, such as every button or every link.
标记
<header>...</header>请求示例
Change the style of all button tags inside the header.
含义
A complete piece of HTML, usually made from a start tag, content, and an end tag.
如何指定
Say element when you mean one visible part of the page, such as a title, card, or button.
标记
<button>Menu</button>请求示例
Move the language switcher element next to the menu button.
含义
Extra information written inside a start tag, such as href, class, id, src, or aria-label.
如何指定
Attributes are useful when the same tag appears many times but only one has a specific class, id, or label.
标记
<a href="/ko">Home</a>请求示例
Add an aria-label attribute to the icon-only menu button.
基础
Opening and closing tag
Opening and closing tag
<section>Content</section>
含义
Many elements start with an opening tag and end with a matching closing tag.
如何指定
This helps when explaining where a section begins and ends in markup.
注意
A missing closing tag can make the browser treat later content as part of the wrong element.
标记
<section>Content</section>请求示例
Check that the card section has matching opening and closing tags.
含义
A declaration that tells the browser to render the document as modern HTML.
如何指定
It is usually handled by the framework and rarely edited during component work.
标记
<!doctype html>请求示例
Do not change the document type; only edit the page component.
<html lang="ko">...</html>
含义
The root element that wraps the whole HTML document.
如何指定
The html element is used for document-wide settings such as language or theme attributes.
标记
<html lang="ko">...</html>请求示例
Set the html lang attribute correctly for each locale.
<head><title>...</title></head>
含义
The document area for metadata, title, icons, SEO tags, and scripts that are not visible page content.
如何指定
Use this term when asking to change SEO title, description, canonical URL, or metadata.
标记
<head><title>...</title></head>请求示例
Update the metadata title for the HTML structure terms page.
<body>Visible page</body>
含义
The document area that contains visible page content.
如何指定
Most layout, header, menu, and tool edits happen inside the body.
标记
<body>Visible page</body>请求示例
Keep the body background consistent in light and dark mode.
<title>Engineering Tools for AI</title>
含义
The page title shown in the browser tab and often used by search engines.
如何指定
Use it when the visible H1 is fine but the browser or SEO title needs to change.
标记
<title>Engineering Tools for AI</title>请求示例
Make the browser title more specific without changing the visible page heading.
<meta name="description" content="...">
含义
Metadata tags that describe the page, viewport, encoding, or social preview information.
如何指定
Meta descriptions affect previews and search snippets, not visible page text.
标记
<meta name="description" content="...">请求示例
Update the meta description to mention searchable HTML terms.
含义
A semantic region for introductory or top navigation content.
如何指定
Use header when targeting the site title, top navigation, theme button, language button, or menu button.
标记
<header>...</header>请求示例
Move the language switcher inside the header controls next to the menu button.
含义
A semantic region for major navigation links.
如何指定
Use nav when editing category links, menu groups, or page navigation.
标记
<nav>...</nav>请求示例
Group the menu links inside nav by Converter, Math, and Programming.
含义
The primary content area of a page. A page should generally have one main element.
如何指定
Use main when distinguishing page content from the header, footer, or menu.
标记
<main>...</main>请求示例
Keep the floating menu above the main content without pushing it down.
含义
A thematic grouping of related content, usually with a heading.
如何指定
Use section when targeting a large page block, such as hero, tools, or reference content.
标记
<section>...</section>请求示例
Reduce the vertical padding of the tools section on mobile.
含义
A self-contained content item, such as a card, post, reference entry, or result.
如何指定
Use article when each repeated card has its own title and body.
标记
<article>...</article>请求示例
Make each term article more compact on desktop.
含义
A region for supporting content related to the main content, often a sidebar or note.
如何指定
Use aside when asking for a filter panel, side navigation, or supporting note to move.
标记
<aside>...</aside>请求示例
Move the aside below the main content on mobile.
含义
A bottom region for legal links, secondary navigation, contact information, or closing content.
如何指定
Use footer when targeting the page bottom rather than a section bottom.
标记
<footer>...</footer>请求示例
Add a small legal link group to the footer.
含义
A heading element from h1 to h6 that gives structure to page content.
如何指定
Use heading level when asking to change the hierarchy, not only the visual size.
注意
Do not choose h1 or h2 only for size; use CSS for visual size and headings for document structure.
标记
<h1>Page title</h1>请求示例
Keep the page title as h1 and make card titles h2 or h3.
如何指定
Use paragraph when changing descriptive body text or its spacing.
标记
<p>Description text.</p>请求示例
Shorten the paragraph under the hero title.
<a href="/ko/tools/math-prompt">Start</a>
含义
A link element that navigates to another page, route, file, or location.
如何指定
Use anchor or link when the element moves somewhere instead of performing an in-place action.
标记
<a href="/ko/tools/math-prompt">Start</a>请求示例
Change the Browse tools link so it scrolls to the tools section.
含义
A group of related items, either unordered with ul or ordered with ol.
如何指定
Use list when asking to add, remove, reorder, or group repeated text items.
标记
<ul><li>Item</li></ul>请求示例
Group the menu items into category lists.
<table><tr><td>Cell</td></tr></table>
含义
A structured grid of rows and cells for tabular data.
如何指定
Use table when the content is true row-and-column data, not just a visual grid of cards.
标记
<table><tr><td>Cell</td></tr></table>请求示例
Use a table for truth table data instead of plain div blocks.
<pre><code>npm run build</code></pre>
含义
code marks code text. pre keeps line breaks and spacing for multi-line code.
如何指定
Use code block when commands or examples must keep exact spacing.
标记
<pre><code>npm run build</code></pre>请求示例
Show terminal commands in a pre/code block.
内容
Strong and emphasis
strong / em
<strong>Important</strong>
含义
Semantic emphasis elements. strong means importance; em means stress emphasis.
如何指定
Use these for meaningful emphasis, not just decorative bold or italic styling.
标记
<strong>Important</strong>请求示例
Use strong for the warning phrase inside the note.
<img src="/hero.png" alt="Tool preview">
含义
An element that displays an image file.
如何指定
Use image when asking to replace, resize, crop, or add alternative text to visual media.
标记
<img src="/hero.png" alt="Tool preview">请求示例
Add a clear alt attribute to the hero image.
<img alt="Menu panel open">
含义
Text that describes an image for screen readers and when the image cannot load.
如何指定
Use alt when asking to improve accessibility or image meaning.
注意
Decorative images can use empty alt text, but meaningful images need a useful description.
标记
<img alt="Menu panel open">请求示例
Add alt text that explains what the screenshot shows.
含义
A vector graphic element often used for icons, diagrams, and scalable shapes.
如何指定
Use SVG when the visual is a simple shape or icon that should remain crisp.
标记
<svg>...</svg>请求示例
Use an SVG icon for the menu button if there is no icon library available.
<button type="button">Menu</button>
含义
A control that performs an action when clicked or tapped.
如何指定
Use button when the control changes UI state, opens a menu, submits a form, or runs an action.
注意
For navigation, a link is usually better than a button.
标记
<button type="button">Menu</button>请求示例
Make the menu button close the language dropdown before opening the menu.
含义
A group of controls used to collect and submit user input.
如何指定
Use form when inputs belong to one submission or one input workflow.
标记
<form>...</form>请求示例
Group the search input and category controls in one form-like control area.
<label for="search">Search</label>
含义
Text that names a form control.
如何指定
Use label when an input needs visible or screen-reader-friendly naming.
标记
<label for="search">Search</label>请求示例
Add a label for the search input without cluttering the UI.
<input type="search" placeholder="Search">
含义
A field where the user types or chooses a value.
如何指定
Use input when targeting search fields, text fields, numbers, checkboxes, or other simple controls.
标记
<input type="search" placeholder="Search">请求示例
Make the search input full width on mobile.
<select><option>English</option></select>
含义
A native dropdown control for choosing one option from a list.
如何指定
Use select when the control is a native form dropdown, not a custom menu panel.
标记
<select><option>English</option></select>请求示例
Style the language select so the selected option is readable in dark mode.
<textarea>Long text</textarea>
含义
A multi-line text input.
如何指定
Use textarea when users need to paste or edit longer text.
标记
<textarea>Long text</textarea>请求示例
Increase the textarea height for long prompt input.
<button class="icon-button">...</button>
含义
An attribute used to group elements for styling or behavior.
如何指定
Class is often the most practical way to target a repeated UI pattern.
标记
<button class="icon-button">...</button>请求示例
Apply the same class to all menu category toggle buttons.
<section id="tools">...</section>
含义
A unique identifier for one element on a page.
如何指定
Use id when a link needs to scroll to a specific section or a label must connect to one input.
注意
The same id should not be reused for multiple elements on one page.
标记
<section id="tools">...</section>请求示例
Add an id to the tools section so the Browse tools link can scroll there.
<a href="/ko/reference/html-structure-terms">HTML</a>
含义
The destination URL or fragment for a link.
如何指定
Use href when a link points to the wrong page or section.
标记
<a href="/ko/reference/html-structure-terms">HTML</a>请求示例
Change the Programming menu href to the new HTML structure terms page.
<img src="/images/example.png" alt="Example">
含义
The source file path for images, scripts, iframes, and similar media.
如何指定
Use src when an image or script is missing, wrong, or should be replaced.
标记
<img src="/images/example.png" alt="Example">请求示例
Replace the image src with the new preview image path.
含义
Custom attributes used to store state or metadata on an element.
如何指定
Use data attributes when styling depends on a state such as theme, open, closed, or selected.
标记
<html data-theme="dark">请求示例
Use data-theme on the html element to switch dark mode colors.
<div role="menu">...</div>
含义
An accessibility attribute that describes what kind of UI object an element represents.
如何指定
Use role when a custom component needs clear semantics, such as menu, dialog, tab, or alert.
注意
Native semantic elements are usually better than adding role to a generic div.
标记
<div role="menu">...</div>请求示例
Give the custom language list an appropriate menu role.
<button aria-label="Toggle menu">...</button>
含义
A text label for assistive technologies when visible text is missing or insufficient.
如何指定
Use aria-label for icon-only controls such as menu, search, close, or theme buttons.
标记
<button aria-label="Toggle menu">...</button>请求示例
Add an aria-label that clearly names the hamburger menu button.
无障碍
aria-expanded
aria-expanded
<button aria-expanded="false">Menu</button>
含义
An accessibility attribute that tells whether a controlled panel is open or closed.
如何指定
Use it for dropdown buttons, accordions, and menu toggles.
标记
<button aria-expanded="false">Menu</button>请求示例
Update aria-expanded when the menu category opens or closes.
层级与关系
Parent and child
Parent and child
<nav><a>Link</a></nav>
含义
A parent element contains child elements inside it.
如何指定
Use this when the target depends on where it is located, such as links inside nav or buttons inside header.
标记
<nav><a>Link</a></nav>请求示例
Style only the links that are children of the header nav.
含义
Elements that share the same parent are siblings.
如何指定
Use sibling when spacing or interaction depends on neighboring items.
标记
<button /> <button />请求示例
Reduce the gap between sibling header buttons.
<section><article><h2>Title</h2></article></section>
含义
The structure created when elements are placed inside other elements.
如何指定
Use nesting when explaining exactly which inner element should change.
标记
<section><article><h2>Title</h2></article></section>请求示例
In each card, move the request example below the property chips.
<div class="container">...</div>
含义
An element used mainly to group, constrain, or position other elements.
如何指定
Use wrapper when the layout needs a surrounding element rather than changes to each child.
标记
<div class="container">...</div>请求示例
Add a wrapper around the header controls so the dropdown can align to the right.
<div class="container">Page content</div>
含义
A wrapper that keeps page content aligned and constrained to a readable width.
如何指定
Use container when changing the overall content width or side padding.
标记
<div class="container">Page content</div>请求示例
Make the main content container slightly narrower on desktop.
含义
A wrapper used in React to group elements without adding an extra DOM element.
如何指定
Use fragment when grouping elements without affecting layout or CSS selectors.
标记
<>...</>请求示例
Use a fragment instead of adding an unnecessary wrapper div.
无障碍
Semantic HTML
Semantic HTML
<main><section><h1>...</h1></section></main>
含义
HTML that uses elements according to their meaning, not only their visual appearance.
如何指定
Use semantic HTML when improving structure, accessibility, SEO, or maintainability.
标记
<main><section><h1>...</h1></section></main>请求示例
Use semantic HTML for the reference page sections instead of generic divs everywhere.
<header> <nav> <main> <footer>
含义
Important page regions that help assistive technology users navigate quickly.
如何指定
Header, nav, main, aside, and footer can act as landmarks.
标记
<header> <nav> <main> <footer>请求示例
Keep one clear main landmark on each page.
无障碍
Accessible name
Accessible name
<button aria-label="Open menu">☰</button>
含义
The name assistive technology uses to announce a control.
如何指定
Use accessible name when a control is visually clear but not named for screen readers.
标记
<button aria-label="Open menu">☰</button>请求示例
Give the theme toggle a clear accessible name in every locale.
<button tabindex="0">Action</button>
含义
An attribute that can affect keyboard focus order.
如何指定
Use it carefully when custom controls are not reachable by keyboard.
注意
Positive tabindex values can create confusing keyboard order. Native focus order is usually better.
标记
<button tabindex="0">Action</button>请求示例
Avoid positive tabindex values and keep keyboard order natural.