Engineering Tools for AI

程式設計

頁面編輯用的 HTML 結構術語

搜尋標籤、元素、屬性、頁面區域、表單控制項與無障礙標籤。

51 個項目

基礎

Tag

Tag

<header>...</header>

意思

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.

基礎

Element

Element

<button>Menu</button>

意思

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.

基礎

Attribute

Attribute

<a href="/ko">Home</a>

意思

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.

文件結構

DOCTYPE

DOCTYPE

<!doctype html>

意思

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

html

<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

head

<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

body

<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

title

<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

meta

<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.

頁面區域

header

header

<header>...</header>

意思

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.

頁面區域

nav

nav

<nav>...</nav>

意思

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.

頁面區域

main

main

<main>...</main>

意思

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.

頁面區域

section

section

<section>...</section>

意思

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.

頁面區域

article

article

<article>...</article>

意思

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.

頁面區域

aside

aside

<aside>...</aside>

意思

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.

頁面區域

footer

footer

<footer>...</footer>

意思

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.

內容

Heading

Heading

<h1>Page title</h1>

意思

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.

內容

Paragraph

p

<p>Description text.</p>

意思

A paragraph of text.

如何指定

Use paragraph when changing descriptive body text or its spacing.

標記

<p>Description text.</p>

請求範例

Shorten the paragraph under the hero title.

內容

Anchor link

a

<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.

內容

List

List

<ul><li>Item</li></ul>

意思

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

table

<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.

內容

Code block

code / pre

<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.

圖片與媒體

Image

img

<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.

圖片與媒體

Alt text

alt

<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.

圖片與媒體

SVG

svg

<svg>...</svg>

意思

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

button

<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.

表單與控制項

Form

form

<form>...</form>

意思

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

label

<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

input

<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

select

<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

textarea

<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.

屬性

Class

class

<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.

屬性

ID

id

<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.

屬性

href

href

<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.

屬性

src

src

<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.

屬性

Data attribute

data-*

<html data-theme="dark">

意思

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.

無障礙

role

role

<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.

無障礙

aria-label

aria-label

<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.

階層與關係

Sibling

Sibling

<button /> <button />

意思

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.

階層與關係

Nesting

Nesting

<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.

階層與關係

Wrapper

Wrapper

<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.

階層與關係

Container

Container

<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.

階層與關係

Fragment

Fragment

<>...</>

意思

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.

無障礙

Landmark

Landmark

<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.

無障礙

tabindex

tabindex

<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.