> **Source:** https://knowledge.leegality.com/document-execution/template/html-template/formatting-and-editing/source-html > **Site:** Leegality Knowledge Base — https://knowledge.leegality.com > **About:** Leegality is a document execution platform covering eSigning, stamps, NeSL, workflows, and REST API integration. > **Navigation:** Every article on this site has a plain-text version at `.txt` (this format). To get an index of all articles with their `.txt` links, read: https://knowledge.leegality.com/llms.txt > **AI Guide:** For instructions on how to navigate this knowledge base as an AI agent, read: https://knowledge.leegality.com/ai-readable.txt --- # Source HTML Source HTML gives you access to the backend code view of your template. The primary use of this feature is to duplicate templates with exact properties—including all features, fields, and formatting—without losing any details during the copy-paste process. When you copy and paste content normally in the visual editor, some properties can get lost, especially font types, spacing, or field configurations. The Source HTML feature solves this by letting you copy the complete HTML code and paste it into another document, ensuring an exact replica of your template. > **Info — No HTML Knowledge Required** > > You don't need to know HTML to use this feature. Simply copy the source code from one template and paste it into another to duplicate the exact structure and formatting. ## Access Source HTML view To view the HTML code of your template: 1. In the HTML Template editor, click the **`<>` Source** button in the top left corner of the toolbar. 2. The editor will switch to code view, displaying the HTML markup (backend view). 3. You can now copy the entire code or make edits if needed. 4. Click **`<>` Source** again to switch back to the visual editor. > **Warning — Toolbar Disabled in HTML View** > > When you're in Source HTML view, all other toolbar options (like inserting checkboxes, textboxes, images, etc.) are disabled. This is because Source HTML is the backend view, while the other toolbar options are frontend tools. You must switch back to the visual editor to use those features. ## When to use Source HTML - **Duplicate templates exactly:** Copy the source code from one template and paste it into another document to replicate all properties, fields, and formatting without any loss of detail. - **Copy HTML templates from Sandbox to Production:** Copy the source HTML from your sandbox template and paste the copied HTML code in the new production HTML template. - **Fix formatting issues:** If the visual editor creates unexpected formatting or spacing that you can't fix normally, you can adjust it directly in the source code. - **Clean up pasted content:** When content pasted from Word documents or websites brings unwanted formatting, you can clean it up in Source HTML view. - **Paste external HTML templates:** If you have an HTML template from another source (like an email template or web design), you can paste it into Source HTML view and adapt it for your document. > **Tip — Merging Multiple Templates** > > When merging 2-3 different templates together, ensure consistent **[margins and borders](https://knowledge.leegality.com/document-execution/template/html-template/formatting-and-editing/margins-and-borders)** across all templates to avoid distortion.