Line breaks (br), online
Six activities your students do on their own devices. See who's finished, and their scores.
Line breaks (br) in one minute
What students need to know
Each <br> here inserts a line break with no closing tag. This is the correct usage for formatting an address. The <br> keeps both lines inside the same <p> but moves the second line down, creating a line break without a new paragraph.
<br> is self-closing - it has no content and no closing tag. Writing </br> is invalid HTML. The correct element is <br>. There is no <break> element in HTML.
Mistakes students make
- <br> is a self-closing element - it must not have a closing </br> tag. The correct form is simply <br> with no forward slash at the start.
- HTML tag names must be lowercase. <BR> with capital letters is non-standard. The correct form is <br> in lowercase.
- Using multiple <br> elements to create spacing is bad practice. For visual spacing between content blocks, use CSS margin or padding instead of stacking line breaks.
- <br> is self-closing - it must never have a closing </br> tag. The correct form is just <br> or <br/>.
What students will learn in this module
Every question in Module 10
Quick questions
- True or false: <br> needs a closing </br> tag.ATrueBFalse
- Which of these is a valid way to write a line break in HTML5?A<br>B<break>
- True or false: <BR> with capital letters is valid HTML.ATrueBFalse
- What is the best use case for <br>?ALine breaks in addresses or poetryBAdding space between paragraphs
- True or false: <br/> and <br> are both valid in HTML5.ATrueBFalse
Key terms
Students type the meaning of:
<br>
Match the pairs
<p>Line one<br> Line two</p>Match it to what it does
<br/>Match it to what it does<br> is self-closing - it has no content and needs no closing tagMatch it to what it does<br> forces the next content onto a new line within the same blockMatch it to what it does<p>Hello<br></br>World</p>Match it to what it does<p>Section one</p><br><br><br><p>Section two</p>Match it to what it doesFill in the blanks
<p>Line one<___> Line two</p>
Hint: Type the self-closing element that inserts a line break
<p>First line<br> Second line<___> Third line</p>
Hint: Type the element name that forces a line break
<p>42 Oak Ave<___> Melbourne</p>
Hint: Type the self-closing tag that moves text to the next line
<p>Roses are red<___/> Violets are blue</p>
Hint: Type the element name used inside the self-closing br tag
<body> <p>Hello<___> World</p> </body>
Hint: Type the tag name that breaks the line without starting a new paragraph
Spot the error
Question 1
A</br>Line oneB<p>Line two</p>C<p>Line three</p>
Question 2
A<p>B First line<BR>C Second lineD</p>
Question 3
A<p>B Street addressC <br><br><br>D City nameE</p>
Question 4
A<p>First line<br>B<p>Second line<br>C<p>Third line<br>D<br></br>
Question 5
A<body>B <p>Hello World</p>C <p>How are you?</p>D <p>Fine thanks</p>E <break>New section</break>
