📜  br在html中是什么意思

📅  最后修改于: 2020-11-04 01:20:30             🧑  作者: Mango

br在html中是什么意思

br是HTML中的标记。 HTML
标签用于换行。当用户必须写诗,地址和代码样本时,此标签很有用。


标签是空标签或取消配对标签,即,无需关闭该标签。但是在XHTML的代码中,我们必须关闭
标签。

我们可以通过一个示例轻松地了解br标签。因此,我们将提供以下两个示例。

示例1:该示例显示了如何使用的代码
在诗歌中标记链接断开。


   
    
   
Example: how to use <br> tag in poem


 
Hello User!...
Poem

Hold fast to dreams
For if dreams die
Life is a broken-winged bird
That cannot fly.
Hold fast to dreams
For when dreams go
Life is a barren field
Frozen with snow.

下面的屏幕快照显示了以上HTML代码的输出:

示例2:该示例显示了如何使用的代码
代码示例中的标记以换行。


   
    
   
Example: how to use <br> tag in code sample


 
Hello User!...
Code for add two number

int main()
{
int x, y, z;
printf("Enter two numbers to add\n");
scanf("%d%d", &x, &y);
printf("Sum of the numbers = %d\n", z);
}

下面的屏幕快照显示了以上HTML代码的输出: