HTML <br> tagThe <br> tag in HTML document is used to create a line break in a text. It is generally used in poem or address where the division of line is necessary. It is an empty tag, which means it does not need a company of end tag. If you place the <br> tag in the HTML code, then it works the same as pressing the enter key in a word processor. Note: Don't use br tag for the margin between two paragraphs, use CSS margin property instead.SyntaxDifference between HTML <br> and <br/>You can use HTML br tag two ways: <br> or <br/>. It is recommended to use closed br tag <br/> because it is supported in HTML and XHTML both. Example 1: Test it NowOutput: ![]() Example 2: The following example uses the <br> tag in the address: Test it NowOutput: ![]() Example 2: The following example uses the <br> tag in the poem: Test it NowOutput: ![]() Browser Support
Next TopicHTML button tag
|
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week