WordPress

Custom HTML Blocks

Learn to insert scoped trusted fragments safely and avoid document wrappers and theme conflicts in this beginner-friendly website development lesson.

Learning outcomes

  • Explain how to insert scoped trusted fragments safely.
  • Complete the guided practice safely.
  • Check that you can avoid document wrappers and theme conflicts.

Before you begin

Work on a practice copy, keep filenames lowercase and hyphenated, and create a backup before changing a live website.

Open official guidance ↗

Step-by-step instructions

  1. Open the relevant project page, file or WordPress screen and confirm you are working on a safe practice copy.
  2. Paste and preview a practice fragment.
  3. Inspect the result using browser tools or WordPress Preview; do not publish yet.
  4. Check keyboard use, mobile layout, content accuracy, links, images and privacy where applicable.
  5. Confirm that you can avoid document wrappers and theme conflicts, then save a clearly named version or backup.
Ian's practical tip: Preview first, test at desktop and mobile sizes, and keep a recoverable copy before publishing.

Practical activity

Paste and preview a practice fragment. The expected result is to avoid document wrappers and theme conflicts.

Completion checklist