HTML教程
HTML5教程
HTML参考手册

br在html中是什么意思?

br是html中的标记。 HTML <br> 标签用于分隔文本行。当用户写诗,地址和代码示例时,此标签很有用。
<br> 标签是空标签或取消配对标签,即没有需要关闭此标签。但在XHTML的代码中,我们关闭 <br>标签
我们可以通过一个示例轻松地了解br标签。因此,我们将提供以下两个示例。
示例1:此示例显示了如何在诗歌中使用<br>标记进行链接断开的代码。
<!Doctype Html>
<Html>
<Head>
<Title>
Example: how to use <br> tag in poem
</Title>
</Head>
<Body bgcolor="red">
Hello User!...
<center>
Poem
<br> <br>
<font color="blue">
Hold fast to dreams <br>
For if dreams die <br>
Life is a broken-winged bird <br>
That cannot fly. <br>
Hold fast to dreams <br>
For when dreams go <br>
Life is a barren field <br>
Frozen with snow. <br>
</center>
</Body>
</Html>
HTML 代码的输出显示在以下屏幕截图中:
 br在html中的含义
示例2:此示例显示了代码如何在代码示例中使用<br>标记进行换行。
<!Doctype Html>
<Html>
<Head>
<Title>
Example: how to use <br> tag in code sample
</Title>
</Head>
<Body bgcolor="orange">
Hello User!...
<center>
Code for add two number
<br> <br>
<font color=" blue">
int main() <br>
{ <br>
int x, y, z; <br>
printf("Enter two numbers to add\n"); <br>
scanf("%d%d", &x, &y);<br>
printf("Sum of the numbers = %d\n", z);<br>
}<br>
</center>
</Body>
</Html>
上述HTML代码的输出显示在以下屏幕截图中:
br在html
昵称: 邮箱:
Copyright © 2022 立地货 All Rights Reserved.
备案号:京ICP备14037608号-4