Engineering Tools for AI

Lập trình

Thuật ngữ cấu trúc HTML cho chỉnh trang

Tra cứu tag, element, attribute, vùng trang, form control và nhãn accessibility.

51 mục

Cơ bản

Tag

Tag

<header>...</header>

Ý nghĩa

A markup keyword wrapped in angle brackets that tells the browser what kind of element to create.

Cách nhắm mục tiêu

Use the tag name when the target is a broad element type, such as every button or every link.

Markup

<header>...</header>

Ví dụ yêu cầu

Change the style of all button tags inside the header.

Cơ bản

Element

Element

<button>Menu</button>

Ý nghĩa

A complete piece of HTML, usually made from a start tag, content, and an end tag.

Cách nhắm mục tiêu

Say element when you mean one visible part of the page, such as a title, card, or button.

Markup

<button>Menu</button>

Ví dụ yêu cầu

Move the language switcher element next to the menu button.

Cơ bản

Attribute

Attribute

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

Ý nghĩa

Extra information written inside a start tag, such as href, class, id, src, or aria-label.

Cách nhắm mục tiêu

Attributes are useful when the same tag appears many times but only one has a specific class, id, or label.

Markup

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

Ví dụ yêu cầu

Add an aria-label attribute to the icon-only menu button.

Cơ bản

Opening and closing tag

Opening and closing tag

<section>Content</section>

Ý nghĩa

Many elements start with an opening tag and end with a matching closing tag.

Cách nhắm mục tiêu

This helps when explaining where a section begins and ends in markup.

Lưu ý

A missing closing tag can make the browser treat later content as part of the wrong element.

Markup

<section>Content</section>

Ví dụ yêu cầu

Check that the card section has matching opening and closing tags.

Tài liệu

DOCTYPE

DOCTYPE

<!doctype html>

Ý nghĩa

A declaration that tells the browser to render the document as modern HTML.

Cách nhắm mục tiêu

It is usually handled by the framework and rarely edited during component work.

Markup

<!doctype html>

Ví dụ yêu cầu

Do not change the document type; only edit the page component.

Tài liệu

html

html

<html lang="ko">...</html>

Ý nghĩa

The root element that wraps the whole HTML document.

Cách nhắm mục tiêu

The html element is used for document-wide settings such as language or theme attributes.

Markup

<html lang="ko">...</html>

Ví dụ yêu cầu

Set the html lang attribute correctly for each locale.

Tài liệu

head

head

<head><title>...</title></head>

Ý nghĩa

The document area for metadata, title, icons, SEO tags, and scripts that are not visible page content.

Cách nhắm mục tiêu

Use this term when asking to change SEO title, description, canonical URL, or metadata.

Markup

<head><title>...</title></head>

Ví dụ yêu cầu

Update the metadata title for the HTML structure terms page.

Tài liệu

body

body

<body>Visible page</body>

Ý nghĩa

The document area that contains visible page content.

Cách nhắm mục tiêu

Most layout, header, menu, and tool edits happen inside the body.

Markup

<body>Visible page</body>

Ví dụ yêu cầu

Keep the body background consistent in light and dark mode.

Tài liệu

title

title

<title>Engineering Tools for AI</title>

Ý nghĩa

The page title shown in the browser tab and often used by search engines.

Cách nhắm mục tiêu

Use it when the visible H1 is fine but the browser or SEO title needs to change.

Markup

<title>Engineering Tools for AI</title>

Ví dụ yêu cầu

Make the browser title more specific without changing the visible page heading.

Tài liệu

meta

meta

<meta name="description" content="...">

Ý nghĩa

Metadata tags that describe the page, viewport, encoding, or social preview information.

Cách nhắm mục tiêu

Meta descriptions affect previews and search snippets, not visible page text.

Markup

<meta name="description" content="...">

Ví dụ yêu cầu

Update the meta description to mention searchable HTML terms.

Vùng trang

header

header

<header>...</header>

Ý nghĩa

A semantic region for introductory or top navigation content.

Cách nhắm mục tiêu

Use header when targeting the site title, top navigation, theme button, language button, or menu button.

Markup

<header>...</header>

Ví dụ yêu cầu

Move the language switcher inside the header controls next to the menu button.

Vùng trang

nav

nav

<nav>...</nav>

Ý nghĩa

A semantic region for major navigation links.

Cách nhắm mục tiêu

Use nav when editing category links, menu groups, or page navigation.

Markup

<nav>...</nav>

Ví dụ yêu cầu

Group the menu links inside nav by Converter, Math, and Programming.

Vùng trang

main

main

<main>...</main>

Ý nghĩa

The primary content area of a page. A page should generally have one main element.

Cách nhắm mục tiêu

Use main when distinguishing page content from the header, footer, or menu.

Markup

<main>...</main>

Ví dụ yêu cầu

Keep the floating menu above the main content without pushing it down.

Vùng trang

section

section

<section>...</section>

Ý nghĩa

A thematic grouping of related content, usually with a heading.

Cách nhắm mục tiêu

Use section when targeting a large page block, such as hero, tools, or reference content.

Markup

<section>...</section>

Ví dụ yêu cầu

Reduce the vertical padding of the tools section on mobile.

Vùng trang

article

article

<article>...</article>

Ý nghĩa

A self-contained content item, such as a card, post, reference entry, or result.

Cách nhắm mục tiêu

Use article when each repeated card has its own title and body.

Markup

<article>...</article>

Ví dụ yêu cầu

Make each term article more compact on desktop.

Vùng trang

aside

aside

<aside>...</aside>

Ý nghĩa

A region for supporting content related to the main content, often a sidebar or note.

Cách nhắm mục tiêu

Use aside when asking for a filter panel, side navigation, or supporting note to move.

Markup

<aside>...</aside>

Ví dụ yêu cầu

Move the aside below the main content on mobile.

Vùng trang

footer

footer

<footer>...</footer>

Ý nghĩa

A bottom region for legal links, secondary navigation, contact information, or closing content.

Cách nhắm mục tiêu

Use footer when targeting the page bottom rather than a section bottom.

Markup

<footer>...</footer>

Ví dụ yêu cầu

Add a small legal link group to the footer.

Nội dung

Heading

Heading

<h1>Page title</h1>

Ý nghĩa

A heading element from h1 to h6 that gives structure to page content.

Cách nhắm mục tiêu

Use heading level when asking to change the hierarchy, not only the visual size.

Lưu ý

Do not choose h1 or h2 only for size; use CSS for visual size and headings for document structure.

Markup

<h1>Page title</h1>

Ví dụ yêu cầu

Keep the page title as h1 and make card titles h2 or h3.

Nội dung

Paragraph

p

<p>Description text.</p>

Ý nghĩa

A paragraph of text.

Cách nhắm mục tiêu

Use paragraph when changing descriptive body text or its spacing.

Markup

<p>Description text.</p>

Ví dụ yêu cầu

Shorten the paragraph under the hero title.

Nội dung

Anchor link

a

<a href="/ko/tools/math-prompt">Start</a>

Ý nghĩa

A link element that navigates to another page, route, file, or location.

Cách nhắm mục tiêu

Use anchor or link when the element moves somewhere instead of performing an in-place action.

Markup

<a href="/ko/tools/math-prompt">Start</a>

Ví dụ yêu cầu

Change the Browse tools link so it scrolls to the tools section.

Nội dung

List

List

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

Ý nghĩa

A group of related items, either unordered with ul or ordered with ol.

Cách nhắm mục tiêu

Use list when asking to add, remove, reorder, or group repeated text items.

Markup

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

Ví dụ yêu cầu

Group the menu items into category lists.

Nội dung

Table

table

<table><tr><td>Cell</td></tr></table>

Ý nghĩa

A structured grid of rows and cells for tabular data.

Cách nhắm mục tiêu

Use table when the content is true row-and-column data, not just a visual grid of cards.

Markup

<table><tr><td>Cell</td></tr></table>

Ví dụ yêu cầu

Use a table for truth table data instead of plain div blocks.

Nội dung

Code block

code / pre

<pre><code>npm run build</code></pre>

Ý nghĩa

code marks code text. pre keeps line breaks and spacing for multi-line code.

Cách nhắm mục tiêu

Use code block when commands or examples must keep exact spacing.

Markup

<pre><code>npm run build</code></pre>

Ví dụ yêu cầu

Show terminal commands in a pre/code block.

Nội dung

Strong and emphasis

strong / em

<strong>Important</strong>

Ý nghĩa

Semantic emphasis elements. strong means importance; em means stress emphasis.

Cách nhắm mục tiêu

Use these for meaningful emphasis, not just decorative bold or italic styling.

Markup

<strong>Important</strong>

Ví dụ yêu cầu

Use strong for the warning phrase inside the note.

Media

Image

img

<img src="/hero.png" alt="Tool preview">

Ý nghĩa

An element that displays an image file.

Cách nhắm mục tiêu

Use image when asking to replace, resize, crop, or add alternative text to visual media.

Markup

<img src="/hero.png" alt="Tool preview">

Ví dụ yêu cầu

Add a clear alt attribute to the hero image.

Media

Alt text

alt

<img alt="Menu panel open">

Ý nghĩa

Text that describes an image for screen readers and when the image cannot load.

Cách nhắm mục tiêu

Use alt when asking to improve accessibility or image meaning.

Lưu ý

Decorative images can use empty alt text, but meaningful images need a useful description.

Markup

<img alt="Menu panel open">

Ví dụ yêu cầu

Add alt text that explains what the screenshot shows.

Media

SVG

svg

<svg>...</svg>

Ý nghĩa

A vector graphic element often used for icons, diagrams, and scalable shapes.

Cách nhắm mục tiêu

Use SVG when the visual is a simple shape or icon that should remain crisp.

Markup

<svg>...</svg>

Ví dụ yêu cầu

Use an SVG icon for the menu button if there is no icon library available.

Biểu mẫu và điều khiển

Button

button

<button type="button">Menu</button>

Ý nghĩa

A control that performs an action when clicked or tapped.

Cách nhắm mục tiêu

Use button when the control changes UI state, opens a menu, submits a form, or runs an action.

Lưu ý

For navigation, a link is usually better than a button.

Markup

<button type="button">Menu</button>

Ví dụ yêu cầu

Make the menu button close the language dropdown before opening the menu.

Biểu mẫu và điều khiển

Form

form

<form>...</form>

Ý nghĩa

A group of controls used to collect and submit user input.

Cách nhắm mục tiêu

Use form when inputs belong to one submission or one input workflow.

Markup

<form>...</form>

Ví dụ yêu cầu

Group the search input and category controls in one form-like control area.

Biểu mẫu và điều khiển

Label

label

<label for="search">Search</label>

Ý nghĩa

Text that names a form control.

Cách nhắm mục tiêu

Use label when an input needs visible or screen-reader-friendly naming.

Markup

<label for="search">Search</label>

Ví dụ yêu cầu

Add a label for the search input without cluttering the UI.

Biểu mẫu và điều khiển

Input

input

<input type="search" placeholder="Search">

Ý nghĩa

A field where the user types or chooses a value.

Cách nhắm mục tiêu

Use input when targeting search fields, text fields, numbers, checkboxes, or other simple controls.

Markup

<input type="search" placeholder="Search">

Ví dụ yêu cầu

Make the search input full width on mobile.

Biểu mẫu và điều khiển

Select

select

<select><option>English</option></select>

Ý nghĩa

A native dropdown control for choosing one option from a list.

Cách nhắm mục tiêu

Use select when the control is a native form dropdown, not a custom menu panel.

Markup

<select><option>English</option></select>

Ví dụ yêu cầu

Style the language select so the selected option is readable in dark mode.

Biểu mẫu và điều khiển

Textarea

textarea

<textarea>Long text</textarea>

Ý nghĩa

A multi-line text input.

Cách nhắm mục tiêu

Use textarea when users need to paste or edit longer text.

Markup

<textarea>Long text</textarea>

Ví dụ yêu cầu

Increase the textarea height for long prompt input.

Thuộc tính

Class

class

<button class="icon-button">...</button>

Ý nghĩa

An attribute used to group elements for styling or behavior.

Cách nhắm mục tiêu

Class is often the most practical way to target a repeated UI pattern.

Markup

<button class="icon-button">...</button>

Ví dụ yêu cầu

Apply the same class to all menu category toggle buttons.

Thuộc tính

ID

id

<section id="tools">...</section>

Ý nghĩa

A unique identifier for one element on a page.

Cách nhắm mục tiêu

Use id when a link needs to scroll to a specific section or a label must connect to one input.

Lưu ý

The same id should not be reused for multiple elements on one page.

Markup

<section id="tools">...</section>

Ví dụ yêu cầu

Add an id to the tools section so the Browse tools link can scroll there.

Thuộc tính

href

href

<a href="/ko/reference/html-structure-terms">HTML</a>

Ý nghĩa

The destination URL or fragment for a link.

Cách nhắm mục tiêu

Use href when a link points to the wrong page or section.

Markup

<a href="/ko/reference/html-structure-terms">HTML</a>

Ví dụ yêu cầu

Change the Programming menu href to the new HTML structure terms page.

Thuộc tính

src

src

<img src="/images/example.png" alt="Example">

Ý nghĩa

The source file path for images, scripts, iframes, and similar media.

Cách nhắm mục tiêu

Use src when an image or script is missing, wrong, or should be replaced.

Markup

<img src="/images/example.png" alt="Example">

Ví dụ yêu cầu

Replace the image src with the new preview image path.

Thuộc tính

Data attribute

data-*

<html data-theme="dark">

Ý nghĩa

Custom attributes used to store state or metadata on an element.

Cách nhắm mục tiêu

Use data attributes when styling depends on a state such as theme, open, closed, or selected.

Markup

<html data-theme="dark">

Ví dụ yêu cầu

Use data-theme on the html element to switch dark mode colors.

Khả năng truy cập

role

role

<div role="menu">...</div>

Ý nghĩa

An accessibility attribute that describes what kind of UI object an element represents.

Cách nhắm mục tiêu

Use role when a custom component needs clear semantics, such as menu, dialog, tab, or alert.

Lưu ý

Native semantic elements are usually better than adding role to a generic div.

Markup

<div role="menu">...</div>

Ví dụ yêu cầu

Give the custom language list an appropriate menu role.

Khả năng truy cập

aria-label

aria-label

<button aria-label="Toggle menu">...</button>

Ý nghĩa

A text label for assistive technologies when visible text is missing or insufficient.

Cách nhắm mục tiêu

Use aria-label for icon-only controls such as menu, search, close, or theme buttons.

Markup

<button aria-label="Toggle menu">...</button>

Ví dụ yêu cầu

Add an aria-label that clearly names the hamburger menu button.

Khả năng truy cập

aria-expanded

aria-expanded

<button aria-expanded="false">Menu</button>

Ý nghĩa

An accessibility attribute that tells whether a controlled panel is open or closed.

Cách nhắm mục tiêu

Use it for dropdown buttons, accordions, and menu toggles.

Markup

<button aria-expanded="false">Menu</button>

Ví dụ yêu cầu

Update aria-expanded when the menu category opens or closes.

Quan hệ

Parent and child

Parent and child

<nav><a>Link</a></nav>

Ý nghĩa

A parent element contains child elements inside it.

Cách nhắm mục tiêu

Use this when the target depends on where it is located, such as links inside nav or buttons inside header.

Markup

<nav><a>Link</a></nav>

Ví dụ yêu cầu

Style only the links that are children of the header nav.

Quan hệ

Sibling

Sibling

<button /> <button />

Ý nghĩa

Elements that share the same parent are siblings.

Cách nhắm mục tiêu

Use sibling when spacing or interaction depends on neighboring items.

Markup

<button /> <button />

Ví dụ yêu cầu

Reduce the gap between sibling header buttons.

Quan hệ

Nesting

Nesting

<section><article><h2>Title</h2></article></section>

Ý nghĩa

The structure created when elements are placed inside other elements.

Cách nhắm mục tiêu

Use nesting when explaining exactly which inner element should change.

Markup

<section><article><h2>Title</h2></article></section>

Ví dụ yêu cầu

In each card, move the request example below the property chips.

Quan hệ

Wrapper

Wrapper

<div class="container">...</div>

Ý nghĩa

An element used mainly to group, constrain, or position other elements.

Cách nhắm mục tiêu

Use wrapper when the layout needs a surrounding element rather than changes to each child.

Markup

<div class="container">...</div>

Ví dụ yêu cầu

Add a wrapper around the header controls so the dropdown can align to the right.

Quan hệ

Container

Container

<div class="container">Page content</div>

Ý nghĩa

A wrapper that keeps page content aligned and constrained to a readable width.

Cách nhắm mục tiêu

Use container when changing the overall content width or side padding.

Markup

<div class="container">Page content</div>

Ví dụ yêu cầu

Make the main content container slightly narrower on desktop.

Quan hệ

Fragment

Fragment

<>...</>

Ý nghĩa

A wrapper used in React to group elements without adding an extra DOM element.

Cách nhắm mục tiêu

Use fragment when grouping elements without affecting layout or CSS selectors.

Markup

<>...</>

Ví dụ yêu cầu

Use a fragment instead of adding an unnecessary wrapper div.

Khả năng truy cập

Semantic HTML

Semantic HTML

<main><section><h1>...</h1></section></main>

Ý nghĩa

HTML that uses elements according to their meaning, not only their visual appearance.

Cách nhắm mục tiêu

Use semantic HTML when improving structure, accessibility, SEO, or maintainability.

Markup

<main><section><h1>...</h1></section></main>

Ví dụ yêu cầu

Use semantic HTML for the reference page sections instead of generic divs everywhere.

Khả năng truy cập

Landmark

Landmark

<header> <nav> <main> <footer>

Ý nghĩa

Important page regions that help assistive technology users navigate quickly.

Cách nhắm mục tiêu

Header, nav, main, aside, and footer can act as landmarks.

Markup

<header> <nav> <main> <footer>

Ví dụ yêu cầu

Keep one clear main landmark on each page.

Khả năng truy cập

Accessible name

Accessible name

<button aria-label="Open menu">☰</button>

Ý nghĩa

The name assistive technology uses to announce a control.

Cách nhắm mục tiêu

Use accessible name when a control is visually clear but not named for screen readers.

Markup

<button aria-label="Open menu">☰</button>

Ví dụ yêu cầu

Give the theme toggle a clear accessible name in every locale.

Khả năng truy cập

tabindex

tabindex

<button tabindex="0">Action</button>

Ý nghĩa

An attribute that can affect keyboard focus order.

Cách nhắm mục tiêu

Use it carefully when custom controls are not reachable by keyboard.

Lưu ý

Positive tabindex values can create confusing keyboard order. Native focus order is usually better.

Markup

<button tabindex="0">Action</button>

Ví dụ yêu cầu

Avoid positive tabindex values and keep keyboard order natural.