Get the App
SLTechnology News&Howtos  ›  Development  › 

Example Analysis of default attributes of p tag and div tag in html5

Shulou Source: shulou.com Published: 2022-06-01 11:14:49 11月12日 Update

This article mainly shows you the "html5 p tag default and div tag default attribute example analysis", the content is easy to understand, well-organized, hope to help you solve the doubt, the following let the editor lead you to study and learn "html5 p tag default and div tag default attribute example analysis" this article.

The default attribute of the p tag is not much different from that of the div tag, except that margin-top and margin-bottom have a certain value. However, margin-top and margin-bottom were definitely dismembered with line-height.

P instance .lh30 {line-height:20px} .lh50 {line-height:40px}

The first paragraph, the first paragraph, the second row, the third row.

Second paragraph second row

The first paragraph, the first paragraph, the second row, the third row.

Second paragraph second row

Example code, or look at the consistent line height, p paragraph spacing.

The above is all the content of the article "sample Analysis of default attributes of p tag and div tag in html5". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Tags attributes two paragraphs examples analysis content articles examples learning help consistency code but easy to understand more organization paragraphs knowledge editing industry Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Xiaomi Redmi vpn Shulou Technology