Tutorial: CSS Line Spacing

Tutorials | CSS Spacing | CSS Bacground Image | CSS Links

    You can set the line height for paragraphs with embedded style sheets. The advantage of embedding the code in the HEAD section is that the line height will be applied every time you use a tag.
  • Add this code into the HEAD of your document. Change the "12px" to however many pixels you want it to be.

    Note: The comment tags prevent older browsers from displaying the code


  • You can also place the CSS code right in your HTML tag, as an inline style. With the inline style, you have to insert the CSS code into each paragraph
  • Put the first box of code in the HEAD and the second in front of the text you want to affect. Put     at the end of the text you want to change.

  • Change the "20" in 20px (pixels) to the height you want.





© J. K. Phillips     Disclaimer
Current URL: