HTML
Tag - W3docs
Có thể bạn quan tâm
- Password Generator
- HTML Editor
- HTML Encoder
- Base 64
- Code Diff
- JSON Beautifier
- CSS Beautifier
- Markdown Convertor
- Find the Closest Tailwind CSS Color
- Phrase encrypt / decrypt
- Browser Feature Detection
- Number convertor
- CSS Maker
- CSS Maker text shadow
- CSS Maker Text Rotation
- CSS Maker Out Line
- CSS Maker RGB Shadow
- CSS Maker Transform
- CSS Maker Font Face
- Color Picker
- Colors CMYK
- Colors HWB
- Colors HSL
- Color Hex
- Color mixer
- Color Converter
- Colors RGB
- Color Contrast Analyzer
- Color Gradient
- String Length Calculator
- MD5 Hash Generator
- Sha256 Hash Generator
- String Reverse
- URL Encoder
- URL Decoder
- Base 64 Encoder
- Base 64 Decoder
- Extra Spaces Remover
- String to Lowercase
- String to Uppercase
- Word Count Calculator
- Empty Lines Remover
- HTML Tags Remover
- Binary to Hex
- Hex to Binary
- Rot13 Transform on a String
- String to Binary
- Duplicate Lines Remover
- Dark
- Light
- System
- HTML Basics HTML IntroductionEditors & ToolsHTML ElementsHTML Basic TagsHTML AttributesHTML HeadingsHTML FormattingHTML LinksHTML ListsHTML ColorsHTML CommentsHTML TablesHTML BlocksHTML ScriptsHTML Styles - CSSHTML File PathsHTML Computercode
- HTML Templates Layout TemplatesForm Templates
- HTML 5 HTML5 IntroductionHTML5 TagsSemantic ElementsAudio & VideoHTML5 Browser SupportHTML5 Migration
- HTML References Character SetsASCIIISO-8859-1ISO Language CodesUTF-8 EncodingHTML EntitiesKeyboard ShortcutsHTTP MethodsHTML ImagesHTTP Status MessagesMIME-TypesTable of HTML TagsXHTMLHTML URL
- HTML Tags Deprecated TagsHTML Global AttributesEvent Attributes<!-- ... --><!DOCTYPE><a><abbr><acronym><address><applet><area><article><aside><audio><b><base><basefont><bdi><bdo><big><blink><blockquote><body><br><button><canvas><caption><center><cite><code><col><colgroup><data><datalist><dd><del><details><dfn><dialog><dir><div><dl><dt><em><embed><fieldset><figcaption><figure><font><footer><form><frame><frameset><h1>-<h6><head>
- <header><hgroup><hr><html><i><iframe><img><input><ins><isindex><kbd><keygen><label><legend><li><link><main><map><mark><marquee><menu><menuitem><meta><meter><nav><nobr><noframes><noscript><object><ol><optgroup><option><output><p><param><plaintext><picture><pre><progress><q><rb><rp><rt><rtc><ruby><s><samp><script><section><select><small><source><spacer><span><strike>
- <strong><style><sub><summary><sup><svg><table><tbody><td><template><textarea><tfoot><th><thead><time><title><tr><track><tt><u><ul><var><video><wbr><xmp>
- Canvas Tutorial Canvas IntroCanvas DrawingCanvas CoordinatesCanvas GradientsCanvas TextCanvas ImagesCanvas Reference
- SVG Tutorial SVG IntroSVG in HTML5SVG RectangleSVG CircleSVG EllipseSVG LineSVG PolygonSVG PolylineSVG PathSVG TextSVG StrokingSVG Filters IntroSVG Blur EffectsSVG Drop ShadowsSVG LinearSVG RadialSVG Reference
- HTML Attributes Deprecated AttributesHTML Class AttributeHTML id Attribute
- HTML Media HTML MultimediaHTML YouTube Videos
- HTML Forms HTML Forms
- HTML Attribute Reference altasyncacceptcontentcontenteditablecontrolscoordsdisableddownloaddraggableautocompleteautofocusdeferdircolspanaccesskeyactionautoplaycheckedaccept-charset
Definition
The HTML <br> tag defines a line break. Unlike the <p> tag defining a paragraph, an empty indent is not added before the line.
Syntax
The <br> tag is empty, which means that the closing tag isn’t required. But in XHTML, the (<br>) tag must be closed (<br/>).
Example of the HTML <br> tag:
<!DOCTYPE html> <html> <head> <title>Title of the document</title> </head> <body> <h1>Example of the <br> tag usage.</h1> <p> Inside the paragraph, we can put the tag <br />, <br> to transfer a part of the text to another line if necessary.</p> </body> </html> Try it Yourself »Usage
The <br> tag is used to enter line breaks. It is useful for writing addresses, poems or song lyrics.
Do not use <br> tag to separate paragraphs. It is very problematic to use <br> tag to separate the paragraph for the people who navigate through the screen reading technology. Use <p> elements and CSS margin property to control spacing.Example of the HTML <br> tag for entering line breaks:
<!DOCTYPE html> <html> <head> <title>Title of the document</title> </head> <body> <h1>Example of the <br> tag usage</h1> <blockquote> But I'm not the only one<br> I hope some day you'll join us<br> And the world will live as one.<br> </blockquote> <cite>John Lennon "imagine"</cite> </body> </html> Try it Yourself »Attributes
Attributes | Value | Description |
---|---|---|
clear | Specifies how to process the next line if the text wraps around the floating element.Not used in HTML5. | |
all | Reverses the flow around the element from the right and left edges at the same time. | |
left | Reverses the flow from the left side of the element placed after the <br> tag. | |
right | Reverses the flow from the right side. | |
none | Cancels the action of an attribute. |
The <br> tag supports the Global Attributes and the Event Attributes.
Browser support
✓ | ✓ | ✓ | ✓ | ✓ |
Practice Your Knowledge
What is the purpose of the HTML <br> tag and how is it used? It defines a hypertext link It produces a line break in text It can contain other HTML elements inside of it It should be used instead of <p> tags for paragraphs It doesn't have an end tag and contains no content Correct! Incorrect! SubmitQuiz Time: Test Your Skills!
Ready to challenge what you've learned? Dive into our interactive quizzes for a deeper understanding and a fun way to reinforce your knowledge.
- HTML Basics
Related Resources
- HTML <hr> Tag
- HTML <wbr> Tag
- HTML <bdi> Tag
- How to Create Button with Line Breaks
- How to Display the Hidden Element on Hovering Over Hyperlink or <a> Tag
- How to Center an Absolutely Positioned Element in a Div
- How to Break Line Without Using <br> Tag in CSS
- PHP basics
- HTML Basics
- Javascript Basics
- CSS Basics
- ES6 Basics
- TypeScript Basics
- React Basics
- Angular Basics
- Sass Basics
- Git Basics
- Vue.js Basics
- SQL Basics
- Python Basics
- Java Basics
- NodeJS Basics
Từ khóa » Html Br Options
-
The
HTML Element Produces A Line Break In Text (carriage-return). It Is Useful For Writing A Poem Or An Address, Where The Division Of Lines Is Significant. ... Technical Summary. -
HTML Br Tag - W3Schools
-
Add A Line Break In HTML - Tutorial - TeachUcomp, Inc.
-
Using Br To Insert Line Breaks In HTML: Here's How »
-
HTML
Tag -
Line Break In HTML Select Option? - Stack Overflow
-
Br | Dash For Python Documentation | Plotly
-
HTML
Tag - GeeksforGeeks -
Main Tips On HTML Line Break - BitDegree
-
HTML Line Break – How To Break A Line With The HTML
Tag -
What Is The Best Alternative To Repetitive Typing Of
Tags In HTML ... -
Alignment, Font Styles, And Horizontal Rules In HTML Documents
-
HTML Standard
-
Br Tag In HTML - Scaler Topics