Pasted text left its formatting code in the page
General instructions. Open this article from your PageCheck report to see it filled in with what was found on your page.
What it is
When you copy text from Google Docs, Google Sheets, Word or another web page and paste it into the editor of your site, the text can bring invisible formatting code along: a font, a size and a colour on every piece of text, special labels (classes) such as MsoNormal, which Word uses, empty <o:p> tags (Word's paragraph marks), or the data of a spreadsheet's cells. Some editors clean it up while you paste; others keep all of it, and it stays in the page until someone removes it.
<span style="font-size: 11pt; font-family: Arial; color: #000000;">Opening hours</span>
Why clean it up
This is a tidy-up, not an emergency. Visitors see nothing wrong at first, but the leftover code makes every visit load a little more, and a passage pasted with its own font, size and colour looks different from the rest of the page, because it overrides your theme's styling. It also keeps looking that way when you change the theme.
Text from Google Docs or Google Sheets can bring more than formatting. A link keeps Google's redirect, so a click goes through a Google address first. A picture can stay on Google's document servers instead of your site, so every visitor loads it from there and it can stop showing without any change on your site. A formula copied from a spreadsheet sits in the page's code, where anyone who views the page's source code (right-click, View page source) can read it.
What is wrong
On a page with this problem, the code around pasted text looks like the example above, on many paragraphs, or the page holds Google links, Google-hosted pictures or spreadsheet formulas. Open this article from your PageCheck report to see what was found on your page.
How to fix
1. Find the pasted passages. Look for text that is set in a slightly different font, size or spacing from the text around it, or that does not follow your theme's styling. Remember the page's footer, sidebars and widgets: a block pasted there, such as an address, is easily forgotten. The report gives the number of places and examples of the code, and names the parts of the page (header, menu, footer) when they are not all in its content.
2. Clear the formatting. The simplest way that works in every editor: select the passage, cut it, and paste it back as plain text with Ctrl+Shift+V (on a Mac Cmd+Shift+V, or Option+Shift+Cmd+V in Safari). Then apply headings, bold, lists and links again with the editor's own tools.
- WordPress block editor: it cleans most of what comes from Google Docs or Word when you paste into an ordinary paragraph, but the Classic block can keep some of it, and HTML pasted as source code stays exactly as it is. Paste again as plain text there, or retype the passage.
- WordPress classic editor: switch on the toolbar toggle (the last button of the first row) to show the second row, select the passage and press the eraser button, "Clear formatting". The "Paste as text" button in that row pastes without formatting.
- Page builders and other editors (Elementor, Wix, Squarespace, Shopify and the like): use the text widget's own "Clear formatting" or "Paste as plain text" option, or paste with Ctrl+Shift+V.
- A block of code in the footer or a widget: open it, delete the style attributes and the classes that start with Mso, or ask your developer to do it.
3. Replace what points to Google. Do this where the report lists a link, a picture or a formula.
- Links: a link that goes through google.com/url sends the visitor through Google before the real address. Edit the link in the editor and type the address it leads to, without the Google part.
- Pictures: save the picture to your computer, upload it to your site's media library and put it into the page in place of the old one. Then it lives on your site and stays as long as you keep it.
- Formulas: delete the pasted table and build it again with the editor's table block, or paste it as plain text. In Google Sheets, first paste the cells into a new spreadsheet as values only (Edit, Paste special, Values only) and copy them from there: the copied cells then hold no formulas, but they still carry the spreadsheet's other markup, which pasting as plain text removes.
4. Paste as plain text from now on. Use Ctrl+Shift+V (on a Mac Cmd+Shift+V, or Option+Shift+Cmd+V in Safari) whenever you paste into the site. If the editor has no plain-text paste, paste into a plain-text editor first (Notepad on Windows, TextEdit in plain-text mode on a Mac) and copy from there. Ask everyone who edits the site to do the same.
5. Check it. Open the page, clear the site's cache and run the audit again. The places you cleaned are no longer counted.
Clean up the formatting code that text pasted from Google Docs, Google Sheets, Word or another web page left in the pages of my website, without changing how the text reads. Why it matters: the leftover code (fonts, sizes and colours on every piece of text, Mso classes, empty o:p elements, spreadsheet cell data) adds weight to every page load and makes the passages look different from the theme. Google Docs links that go through google.com/url, pictures served by Google's document servers (googleusercontent.com/docs) and spreadsheet formulas (data-sheets-formula) are worse: they send clicks through Google, depend on Google to keep serving the file and expose the formula to anyone who views the source. Steps: 1. Find the pasted passages in the page content, the footer, widgets and templates (look for inline style attributes with fonts and sizes on many spans, classes starting with Mso or SCXW, o:p elements and data-sheets attributes). 2. Remove the formatting: paste the text again as plain text, or strip the style attributes, the classes and the empty elements from the stored content, and re-apply headings, bold, lists and links with the editor's own tools. 3. Replace every link that goes through google.com/url?q= with its real address, upload every picture served from googleusercontent.com/docs or /docsz to the site's media library and use that copy, and remove spreadsheet formulas from the content. 4. Take a backup of the content first, clear the site's cache, check the pages, and tell me which pages you changed.
Subject: example.com – formatting code left by pasted text Hi, A website audit (PageCheck) found formatting code in our pages that was left behind when text was pasted from Google Docs, Google Sheets, Word or another web page. Why it matters: the leftover code makes every page load a little more and makes the pasted passages look different from the rest of the site. Links and pictures that came from Google Docs or Sheets depend on Google and can stop working, and spreadsheet formulas in the page can be read by anyone who views its source code. Please: 1. Clear the formatting of the pasted passages, or paste them again as plain text. 2. Replace links that go through google.com/url with the real address, move pictures that Google serves to our media library, and remove spreadsheet formulas. 3. Tell everyone who edits the site to paste as plain text (Ctrl+Shift+V). Thank you!
Audit your site to see whether it has this problem. Audit a website