Nothing is for sale here. Freewill tips keep the site running. Want to help? → Tip via Paypal
Line Height
Control, control, control—you must be power-mad! Yes indeed, you can control the vertical space in between lines of text.Line height in typography is called leading. Unlike letter spacing where the measurement you use is added to or subtracted from the default measurement, line height is taken literally by the browser.
That means if you code a line height of 3 pixels it will narrow the space in between lines to the point where the lines overlap because the normal line height is greater than three pixels.
Here’s how to add the line-height property to your style sheet rules:
By the way, if you set the line-height to zero, the text turns into a big blob of black, or whatever your text color is. Someone could copy and paste the blob into a text editor though, and read the message even though it's not readable on the page.
NOTE | Changing the line height may not work in some content management systems, such as WordPress. Fortunately, it’s not something we need to do very often. |
Below are examples of line height in use.
In case you didn't read that last line-height example, copy and paste the black blob below into a text editor and read my secret message to you.
Secret message: You are a life artist. Each day is your canvas. Paint the best picture you can each day and your life will be a work of art. Thank you for visiting my site. May your every day be better than the day before.