- HTML Tutorial
- HTML - Home
- HTML - History and Evolution
- HTML - Overview
- HTML - Editors
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Headings
- HTML - Paragraphs
- HTML - Quotations
- HTML - Comments
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Style Sheet
- HTML - CSS Classes
- HTML - CSS IDs
- HTML - Images
- HTML - Image Map
- HTML Tables
- HTML - Tables
- HTML - Headers & Caption
- HTML - Table Styling
- HTML - Table Colgroup
- HTML - Nested Tables
- HTML Lists
- HTML - Lists
- HTML - Unordered Lists
- HTML - Ordered Lists
- HTML - Definition Lists
- HTML Links
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Iframes
- HTML - Blocks
- HTML Backgrounds
- HTML - Backgrounds
- HTML Colors
- HTML - Colors
- HTML - RGB
- HTML - HEX
- HTML - HSL
- HTML Forms
- HTML - Forms
- HTML - Form Attributes
- HTML - Form Control
- HTML - Input Attributes
- HTML Media
- HTML - Video Element
- HTML - Audio Element
- HTML - Embed Multimedia
- HTML Header
- HTML - Head Element
- HTML - Adding Favicon
- HTML - Javascript
- HTML Layouts
- HTML - Layouts
- HTML - Layout Elements
- HTML - Layout using CSS
- HTML - Responsiveness
- HTML - Symbols
- HTML - Emojis
- HTML - Style Guide
- HTML Graphics
- HTML - SVG
- HTML - Canvas
- HTML APIs
- HTML - Geolocation API
- HTML - Drag & Drop API
- HTML - Web Workers API
- HTML - WebSocket
- HTML - Web Storage
- HTML - Server Sent Events
- HTML Miscellaneous
- HTML - MathML
- HTML - Microdata
- HTML - IndexedDB
- HTML - Web Messaging
- HTML - Web CORS
- HTML - Web RTC
- HTML Demo
- HTML - Audio Player
- HTML - Video Player
- HTML - Web slide Desk
- HTML Tools
- HTML - Velocity Draw
- HTML - QR Code
- HTML - Modernizer
- HTML - Validation
- HTML - Color Code Builder
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
- HTML Resources
- HTML - Quick Guide
- HTML - Useful Resources
- HTML - Color Code Builder
- HTML - Online Editor
HTML - <br> Tag
HTML <br> tag is used to break line in a text. When the division of a line is required. Being an empty tag, it is not dependent on an end tag. The <br> tag behaves just like pressing the enter key in a word workstation, when it is used in the HTML code.
In HTML, a paragraph usually begins on a new line, but what if you want content within a paragraph to begin on a new line. In that scenario’s we are going to use the HTML line break.
Syntax
<br>
Attribute
HTML br tag supports Global and Event attributes of HTML. A specific attribute accepted as well which is listed below.
HTML <br> tag supports the following attributes.
Attribute | Values | Description |
---|---|---|
clear | No Value | This ensure that line breaks "cleared" floated or aligned elements above them. |
Example of HTML br Tag
In the bellow examples we will witness the usage of br tag in HTML document, and in how many ways we can use the br tag on our webpages.
Breaking a Paragrapgh Element
In the following example, let's see the usage of the <br> element in the HTML documents.
<!DOCTYPE html> <html> <body> <p> Geckos are a group of usually small, usually nocturnal lizards. <br> They are found on every continent except Antarctica. </p> </body> </html>
Using br tag for Input field
Considering the following example, where we are going to use the<br> tag to display each input field in the new line.
<!DOCTYPE html> <html> <body> <form> <input type="text" placeholder="Enter your name" /> <br> <input type="phone" placeholder="Enter your phone" /> <br> <input type="email" placeholder="Enter your email" /> </form> </body> </html>
Applying Clear attribute on Paragraph
Let's look at the another scenario, where we are going to use clear attribute on the <br> tag. There is no floating element so the output will seem normal.
<!DOCTYPE html> <html> <body> <p> Tutorials Point India Private Limited,<br> Incor9 Building, Kavuri Hills,<br> Madhapur, Hyderabad, <br clear>Telangana - 500081, INDIA </p> </body> </html>
Note: Do not use br tag to set the margin or padding on paragraph or any texual element.
Supported Browsers
Tag | |||||
---|---|---|---|---|---|
br | Yes | Yes | Yes | Yes | Yes |
To Continue Learning Please Login
Login with Google