How to Prevent One Word Lines (widow orphan) In Website Paragraphs

  • read

I am often adding padding to the left and right of paragraphs to force copy down to prevent one word on a line. Or even worse, I add <br> to a word on the line above to prevent the word by itself. But this causes issues with responsive design because the <br> changes position breaking the layout. The script below can help find these cases and return a word down.

Remove one word lines in paragraphs

Source

Written by: Jacob Lett - An experienced website design & SEO optimization consultant who helps B2B industrial companies grow their revenue. He recently created Industrial Pro Website Templates to help manufacturers quickly build their website on the HubSpot CMS platform and leverage a CRM. Connect on LinkedIn
Category: Code Snippets
Tags: