跳到内容

HTML5 Semantic Elements

v1.0.2

niw2cp · 2025年10月30日 上架

Adds HTML5 and semantic elements as blocks in the Gutenberg editor.

正在使用
10+
评分
暂无
累计下载
490
最近更新
2025年10月30日
需要 WordPress 5.8+已测试到 6.8.13PHP 7.4+

贡献者

截图

HTML5 Semantic Elements
HTML5 Semantic Elements
HTML5 Semantic Elements
HTML5 Semantic Elements

The HTML5 Semantic Elements plugin introduces two custom Gutenberg blocks — Article and Aside — that allow you to structure your WordPress content with proper semantic HTML5 elements.

Use the Article block for self-contained content such as blog posts or news items, and the Aside block for related or supplementary information such as sidebars, pull quotes, or callouts.

These semantic elements improve both SEO and accessibility by clearly defining the roles of different content sections.

How to Use

Adding Blocks

  1. Edit any post or page in the block editor
  2. Click the “+” button to add a new block
  3. Search for “Article” or “Aside”
  4. Click the desired block to insert it into your content

Article Block

The Article block creates an HTML5 <article> element, ideal for:
– Blog posts
– News articles
– Forum posts
– Comments
– Independent, self-contained content

Features
– Nest any blocks inside (headings, paragraphs, images, etc.)
– Wide and Full alignment support
– Custom CSS classes
– Anchor ID support
– “Remove Article” button to unwrap the block while keeping its inner content

Removing the Article wrapper
– Toolbar: Select the Article block click the “Remove Article” (X) button
– Menu: Use the three-dot menu “Ungroup”

Aside Block

The Aside block creates an HTML5 <aside> element, perfect for:
– Sidebars
– Pull quotes
– Related content
– Callout boxes
– Supplementary information

Features
– Add any blocks inside
– Left, Right, Wide, and Full alignment options
– Default styling with background color and left border
– Custom CSS classes
– Anchor ID support
– Transform paragraphs, headings, lists, or quotes into Asides
– “Remove Aside” button to unwrap the content

Transforming existing blocks
1. Select an existing block (paragraph, heading, list, quote, pullquote, or group)
2. Click the block icon or three-dot menu
3. Choose “Transform to” “Aside”

Removing the Aside wrapper
– Toolbar: Select the Aside block click the “Remove Aside” (X) button
– Transform: Convert to “Group”
– Menu: Use the three-dot menu “Ungroup”

Styling

Both blocks include basic styling. To customize:

  1. Add a custom CSS class in the Advanced panel of the block settings.
  2. Add your own CSS under Appearance Customize Additional CSS.

Example CSS:

`css

/* Custom Article styling */
.wp-block-html5-semantic-article {
padding: 2em;
background: #ffffff;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Custom Aside styling */
.wp-block-html5-semantic-aside {
background-color: #fffbea;
border-left: 4px solid #f59e0b;
padding: 2em;
}

Block Settings

Block Tab: Alignment options

Advanced Tab: Add custom CSS classes, anchor IDs

Tips

Nest Blocks: Combine headings, text, and media inside semantic containers

SEO Benefits: Helps search engines interpret your content hierarchy

Accessibility: Improves screen reader navigation and content structure

License

This plugin is licensed under the GPL v2 or later.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums