Experiencing unexpected changes in text formatting after saving your work in Divi can be frustrating and time-consuming.
This article addresses the common issue of text formatting alterations that occur when you save your content.
We will guide you through the potential causes of these changes and provide step-by-step solutions to help you maintain consistent text styles.
Custom HTML markup is being removed
WordPress can remove extra formatting when you switch between Visual and Text tabs. If you add a custom HTML Markup, switching between the Visual and Text tabs will remove the custom HTML markup.
Use HTML tags which are allowed
The following HTML tags are accepted to be added as content:
<a href="" title="">
<abbr title="">
<acronym title="">
<b>
<blockquote cite="">
<cite>
<code>
<del datetime="">
<em>
<i>
<q cite="">
<s>
<strike>
<strong>
Unnecessary HTML markup
Copying text from third-party sources such as other web pages, PDF files, Word files, etc, will also paste in HTML code (tags) beside the copied text. This should be avoided, by using the Paste as Plain text option that WordPress TinyMCE editor offers.
Avoid using broken HTML code
If the text content contains broken or invalid HTML code, upon saving, the layout on the front end will look broken.
When using any kind of custom HTML code, use the HTML Validator to ensure that the code is valid.
Examples:
Incorrect:
<h1><a href="#">Link Text</a>
- the closing</h1>
tag is missingCorrect:
<h1><a href="#">Link Text</a></h1>
Issues related to CSS code
If the font size, color, alignment, or similar properties do not work on the front end this might be related to an incorrect CSS code.
In this case, you will need to ensure that the CSS code is valid and has no syntax errors, check the How to Troubleshoot and Fix Custom CSS Issues in Divi article for more details.