Hypertext Markup Language (HTML), is a computer language that tells browsers how to display website content. The Custom HTML block allows you to insert this code and preview it as you edit to fine-tune your content.
📌
For security reasons, not all HTML tags are allowed in the Custom HTML block. Please check the list of supported HTML tags for the ones you can use.
In this guide
To add a Custom HTML block, click on the + Block Inserter icon and search for it, or type /html
on a new line and hit enter.

💡
Using your keyboard, you can also type
/html
on a new line and press enter to quickly add a new Custom HTML block.

For more, visit our detailed instructions on adding blocks.
When you click on the block, a toolbar of options will appear above it:

The Custom HTML block has the following options in its toolbar:
- Change to another type of block
- Drag block handle to change the block position
- Move the block up or down
- Field for adding the HTML code
- Preview the added HTML code
- More options.
While most blocks have specific settings in the right sidebar in addition to the standard block options from the toolbar, the Custom HTML block does not. All editing is done within the block itself.
Once you’ve added the block, you can insert your code, edit, and preview it right within the editor.

Including code that embeds or references Javascript will not display as expected, learn more about embedding Javascript here.
WordPress.com allows the following HTML tags in your posts, pages, and widgets:
- a
- address
- abbr
- acronym
- area
- article
- aside
- b
- big
- blockquote
- br
- caption
- cite
- class
- code
- col
- del
- details
- dd
- div
- dl
- dt
- em
- figure
- figcaption
- footer
- font
- h1, h2, h3, h4, h5, h6
- header
- hgroup
- i
- img
- ins
- kbd
- li
- map
- mark
- ol
- p
- pre
- q
- rp
- rt
- rtc
- ruby
- s
- section
- small
- span
- strike
- strong
- sub
- summary
- sup
- table
- tbody
- td
- tfoot
- th
- thead
- tr
- tt
- u
- ul
- var
These tags are supported in titles on some themes:
a, abbr, b, cite, del, em, i, q, s, strong, strike, u
⚠️
For security reasons, the following tags are only allowed on plugin-enabled sites:
embed, frame, iframe, form, input, object, textarea, style, link
To learn more about working with HTML on WordPress.com, refer to our guides below: