Files
webstudio/docs/university/core-components/element.md
T
Oleg Isonen f1c3abf1be docs: Refresh accessible Builder screenshots at 2x (#6595)
## Outcome

Refresh the accessible low-resolution Builder documentation screenshots
with current, native 2× light and dark captures. Images retain useful
crops, descriptive alt text, and explicit display widths.

The final audit accounts for 165 candidate files: 132 refreshed, 29
inaccessible screenshots kept with the user's approval, two existing
images made 2× by setting their display width, and two Content Engine
query screenshots held because the current Builder shows a false
draft-filter type warning. Those two originals remain in place pending a
separate Builder fix and recapture. Four animated GIFs remain outside
this still-screenshot refresh.

## Review checklist

- [x] Inventory image references, native dimensions, display widths, UI
states, and source pages; audit omitted references across all docs.
- [x] Replace the approved Form pairs and accessible Builder screenshots
with matching 2× light and dark captures.
- [x] Keep inaccessible external/account/desktop and disabled Export
images, as approved.
- [x] Review size-sufficient images and GIF/diagram exclusions.
- [x] Review crops, alt text, widths, links, and source references.
Independent screenshot review passed.
- [x] Check the full docs image inventory: 322 placements, 284 unique
assets, zero missing files. The only unaccounted sub-2× refs are four
excluded GIFs.
- [x] Run `git diff --check` and verify all 204 changed image files are
referenced; 117 changed picture placements have matching themes and at
least 2× native width.
- [x] Verify required PR checks: Lint PR, Check submodules, Visual
regression, and Main workflow all passed at 14937127db.
- [ ] Recapture the two Content Engine query images after [Builder fix
#6597](https://github.com/webstudio-is/webstudio/pull/6597) reaches the
Builder used for capture. Keep their originals until then.\n- [ ]
Confirm GitBook rendering at intended CSS widths after publication. This
repository has no PR preview.

## Held images

`content-engine-overview-query.png` and
`content-engine-article-query.png` are unchanged. The current Builder's
query form reports a false type warning for the Boolean
`properties.draft` filter. Screenshotting that state would teach a
broken workflow. The user approved a separate [Builder query type fix in
PR #6597](https://github.com/webstudio-is/webstudio/pull/6597). Once
that fix is reviewed, the two screenshots can be recaptured from the
corrected UI. This PR does not change application code.

All captures use synthetic content. No release or publication branch is
changed.
2026-10-25 10:11:58 +01:00

4.3 KiB
Raw Blame History

description
description
The Element component is a flexible container for building layouts in Webstudio.

📦 Element

The Element component is a versatile component that can represent any HTML element. It provides the flexibility to create semantic HTML structures with any tag type while maintaining full styling capabilities.


How to Use the Element Component

The Element component can be found in Components > General, and you can place it on your canvas by dragging and dropping it or clicking it in the Components panel.

Components panel with Element listed first in the expanded General group

Available Tags

The Element component can be rendered as many HTML tags, including but not limited to:

Container Elements

  • div (default) – Generic container
  • section – Document section
  • article – Self-contained content
  • aside – Sidebar content
  • header – Header section
  • footer – Footer section
  • main – Main content
  • nav – Navigation section

Text Elements

  • span – Inline container
  • p – Paragraph (rendered as block)

List Elements

  • ul – Unordered list
  • ol – Ordered list
  • li – List item
  • a – Anchor/link (shows href and target properties)

Table Elements

  • table – Table container
  • thead – Table header group
  • tbody – Table body group
  • tfoot – Table footer group
  • tr – Table row
  • th – Table header cell
  • td – Table data cell

Other Elements

  • address – Contact information
  • figure – Figure with optional caption
  • figcaption – Figure caption
  • label – Form label
  • dl – Description list
  • dt – Description term
  • dd – Description details

Changing the Tag

You can change the HTML tag of the Element by opening the Settings Panel located on the right side of the Builder.

Settings panel for a paragraph element with Label, Show, Tag, ID, and Class controls

The tag dropdown shows all available HTML elements you can use. When you change the tag, the component's properties automatically update to show relevant attributes for that element type.


Tag Labels in Navigator

When viewing Elements in the Navigator, the component label displays the HTML tag name (e.g., "section", "nav", "article"). This makes it easy to identify the semantic structure of your page at a glance.

{% hint style="info" %} You can rename Elements in the Navigator by double-clicking to give them more descriptive names like "Hero Section" or "Main Navigation" while still maintaining the correct HTML tag. {% endhint %}


Use Cases

Semantic HTML Structure

Use Element to create proper HTML5 semantic markup:

  • header for site headers
  • nav for navigation menus
  • main for primary content
  • article for blog posts
  • aside for sidebars
  • footer for footers

Custom Tables

Build accessible data tables using Element with table-related tags (table, thead, tbody, tr, th, td).

Description Lists

Create glossaries or key-value displays with dl, dt, and dd tags.

Use the a tag to create links with full styling control and access to the href and target properties.


Element vs Box

The Element component provides more flexibility than the Box component:

Feature Element Box
Tag options Any HTML tag div only
Semantic HTML ✅ Full support ❌ Limited
Navigator label Shows HTML tag Shows "Box"
Use case Semantic structure Quick containers

{% hint style="success" %} For building semantic, accessible websites, prefer Element over Box when you need specific HTML tags. {% endhint %}

  • Slot – Create reusable component slots
  • Link – Navigation and anchor elements
  • HTML Embed – Custom HTML code