📜  HTML段落标签

📅  最后修改于: 2020-11-03 05:54:31             🧑  作者: Mango

HTML段落

HTML段落或HTML p标签用于定义网页中的段落。让我们举一个简单的例子来看看它是如何工作的。值得注意的一点是,浏览器本身在段落之前和之后添加一个空行。 HTML

标签指示新段落的开始。

注意:如果我们使用各种

标签放在一个HTML文件中,然后浏览器会自动在两个段落之间添加一个空白行。

请参阅以下示例:

This is first paragraph.

This is second paragraph.

This is third paragraph.

输出:

This is first paragraph.

 

This is second paragraph.

 

This is third paragraph.

 

HTML段落内的空间

如果在HTML p标签内放置了很多空格,浏览器将在显示页面时删除多余的空格和多余的行。浏览器将空格和行数计为一个。

I am going to provide you a tutorial on HTML and hope that it will be very beneficial for you.

Look, I put here a lot of spaces but I know, Browser will ignore it.

You cannot determine the display of HTML

because resized windows may create different result.

输出:

I am going to provide you a tutorial on HTML and hope that it will be very beneficial for you.

 

Look, I put here a lot of spaces but I know, Browser will ignore it.

 

You cannot determine the display of HTML

 

because resized windows may create different result.

 

如您所见,浏览器将删除所有多余的行和不必要的空格。

如何使用

用段落标记?

HTML
标记用于换行,并且可以与段落元素一起使用。以下是显示如何使用的示例

元件。

例:



     
    
  
      

Use of line break with pragraph tag


Papa and mama, and baby and Dot,
Willie and me?the whole of the lot
Of us all went over in Bimberlie's sleigh,
To grandmama's house on Christmas day.

输出:

HTML


标记用于在两个语句或两个段落之间应用一条水平线。以下是显示使用的示例
用段落标记。

例:



 
    
 
   

Example to show a horizontal line with paragraphs

An HTML hr tag draw a horizontal line and separate two paragraphs with that line.


it will start a new paragraph.

输出:

支持的浏览器

Element chrome browser Chrome ie browser IE firefox browser Firefox opera browser Opera safari browser Safari

Yes Yes Yes Yes Yes