Blog · WebJi® India

How to Edit HTML in WordPress (Block Editor & Widgets)

Quick answer: How to Edit HTML in WordPress (Block Editor & Widgets) from WebJi®, billed in INR with 18% GST on the invoice. Email support@webji.services is 24/7 in Hindi and English (average first reply under 60 minutes). Phone +91 141 4941811 is business hours only. The company has been in this business since 2005.
✓ In business since 2005✓ INR + GST billing✓ 24/7 Email Support — avg reply < 60 min
Indian business partners shaking hands across a desk with a dashboard open on a laptop — how to edit html in wordpress

Four Ways to Edit HTML in WordPress

Four ways, mapped to intent:

MethodUse it for
Custom HTML blockEmbed code — iframe, form, button — inside content
Code editor / Edit-as-HTMLWhole-page or per-block markup fixes
Header/footer scripts plugin or hooksSitewide tags: Analytics, Search Console verification
Child theme templatesSafe theme edits: header.php, single.php

Pick by scope: a snippet inside a page takes the block; sitewide tags take the plugin; theme surgery takes the child theme. WordPress strips some HTML on untrusted roles by sanitisation — admins keep full markup, lower roles do not, which is a feature rather than a bug.

Method 1: The Custom HTML Block

The Custom HTML Block. Do this on one site or a staging copy first, then check the public URL in a private window so cache does not hide the result. Stop if the page errors, and email support@webji.services with the step name and the exact error before you repeat it on every account. WebJi® support mail is staffed 24/7 in Hindi and English; the phone line +91 141 4941811 is business hours only.

Indian business partners shaking hands across a desk with a dashboard open on a laptop — how to edit html in wordpress

Method 2: Code Editor and Edit-as-HTML Mode

  1. Open the page, click the three-dot menu > Code editor — the entire page becomes editable HTML (blocks appear as HTML comments).
  2. Edit and switch back to Visual editor.
  3. For a single block, use the block's three-dot menu > Edit as HTML.

This is how you fix markup across many blocks at once. Caution: malformed HTML can break block parsing — if the editor warns about block errors, undo rather than 'attempt recovery' blindly. Sitewide header and footer tags belong in a plugin or hook, not pasted into pages; theme-level edits belong in a child theme, never the parent.

Method 3: Header and Footer HTML (Plugins and Hooks)

Two practical notes on Editing as HTML per block: it interacts directly with caching and database response, and misconfiguration is the most common cause of 'hosting is slow' tickets. WebJi® support checks it as part of standard migrations.

Method 4: Child Theme Templates (Safe Theme Edits)

Two practical notes on theme file editor: it interacts directly with caching and database response, and misconfiguration is the most common cause of 'hosting is slow' tickets. WebJi® support checks it as part of standard migrations.

Why WordPress Strips Some HTML (Sanitization)

Two practical notes on child theme templates: it interacts directly with caching and database response, and misconfiguration is the most common cause of 'hosting is slow' tickets. WebJi® support checks it as part of standard migrations.

Fixing a Site Broken by HTML Edits

On header/footer HTML (hooks, plugins), the honest summary is that defaults matter more than brand names — a well-set budget plan outranks a mis-tuned premium one. WebJi® documents its defaults openly and adjusts them per ticket when workloads need it.

Frequently Asked Questions

How do I edit the HTML of a WordPress page?

Pick by scope: a snippet inside a page takes the block; sitewide tags take the plugin; theme surgery takes the child theme. WordPress strips some HTML on untrusted roles by sanitisation — admins keep full markup, lower roles do not, which is a feature rather than a bug.

Where is the HTML editor in the Gutenberg block editor?

This is how you fix markup across many blocks at once. Caution: malformed HTML can break block parsing — if the editor warns about block errors, undo rather than 'attempt recovery' blindly. Sitewide header and footer tags belong in a plugin or hook, not pasted into pages; theme-level edits belong in a child theme , never the parent.

How do I edit my theme's HTML without breaking updates?

Pick by scope: a snippet inside a page takes the block; sitewide tags take the plugin; theme surgery takes the child theme. WordPress strips some HTML on untrusted roles by sanitisation — admins keep full markup, lower roles do not, which is a feature rather than a bug. The question here is: How do I edit my theme's HTML without breaking updates.

Can I paste raw HTML into WordPress posts?

For “Can I paste raw HTML into WordPress posts”: Pick by scope: a snippet inside a page takes the block; sitewide tags take the plugin; theme surgery takes the child theme. WordPress strips some HTML on untrusted roles by sanitisation — admins keep full markup, lower roles do not, which is a feature rather than a bug.

How do I edit the header and footer HTML?

This is how you fix markup across many blocks at once. Caution: malformed HTML can break block parsing — if the editor warns about block errors, undo rather than 'attempt recovery' blindly. Sitewide header and footer tags belong in a plugin or hook, not pasted into pages; theme-level edits belong in a child theme , never the parent. The question here is: How do I edit the header and footer HTML.

Why did WordPress strip or break my HTML?

Pick by scope: a snippet inside a page takes the block; sitewide tags take the plugin; theme surgery takes the child theme. WordPress strips some HTML on untrusted roles by sanitisation — admins keep full markup, lower roles do not, which is a feature rather than a bug. The question here is: Why did WordPress strip or break my HTML.

Is WebJi® an Indian company?

Yes. WebJi® is headquartered in Jaipur, Rajasthan and has operated since 2005. Billing, support and governance all run from India.

Do you provide GST invoices?

Every purchase and renewal gets a GST invoice with our GSTIN, and hosting prices are quoted exclusive of 18% GST. Claim input credit as applicable.

Need help with this?

WebJi® support does it for you — free. Talk to our Jaipur team →