How to Edit Paragraph Spacing With CSS


You can set the spacing between paragraphs on a Web page with the help of Cascade Styling Sheets. CSS is a method to adjust and format a Web page without having to insert that code in the HTML personally every time. It's a fast, convenient way to set it once and call it many times. Setting the paragraph spacing is just as easy and requires adding a custom paragraph definition to the CSS section.

  • Open your CSS or HTML file in a text editor. If you are calling CSS properties directly from the HTML file, then you will just need to edit that file. This means you are using internal CSS.

  • Add a new line between the <style type="text/css"> and </style> tags.

  • Type "p {margin-bottom: 10; margin-top: 0}" (without the quotation marks) on the new line. Alternatively, you can edit the paragraph tag if it is already defined in the CSS.

  • Save the CSS or HTML file in the text editor and upload it to your Web hosting server.

Tips & Warnings

  • You can adjust and play around with the margin-bottom value as it fits your website design needs.
  • You should keep the margin-top set to a 0 value on paragraphs. This prevents extra spacing on the top leading paragraph of a web page.

Related Searches


Promoted By Zergnet


Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!