Question of the line spacing of P labels in html

Source: Internet
Author: User

Using the CSS row height style line-height can set the adjustment p line spacing, but also affects the upper and lower spacing between each line of text, so using line-height although can be used to set the HTML p line distance interval, but not very practical, General Line-height only sets the spacing between the upper and lower text.

Use margin to achieve p and p up and down line spacing is the same as BR line 0 distance change
<! DOCTYPE html> "content-type" content= " text/html; Charset=utf-8 " /> <title></title> <style> p{margin:0  Auto}; /* */

Set margin:0 Auto, and you can achieve zero line distance of p.

Question of the line spacing of P labels in html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.