What is the correct tag to insert line breaks in the Marking up a Letter MDN project?

Hi all -

For the Marking up a Letter project in MDN, I included <br> tags under the <dl> element and after running it through the W3 Html Checker, it was stated this was a wrong child to use under the <dl> parent. My code is below - my question is, what is a better way to insert a line break between lines then? It also stated using the <div> tag wasn’t a good option either.

Thanks!

<h2>Exotic dance moves</h2>

<p>Yes, you are right! As part of my post-doctorate work, I did study exotic tribal dances. To answer your question, my favourite dances are as follows, with definitions:</p>

        <dl>
          <dt>Polynesian chicken dance</dt>
          
          <dd>A little known but very influential dance dating back as far as 300<u>BC</u>, a whole village would dance around in a circle like chickens, to encourage their livestock to be "fruitful".</dd>
          <br>
          <dt>Icelandic brownian shuffle</dt>
<dd>Before the Icelanders developed fire as a means of getting warm, they used to practice this dance, which involved huddling close together in a circle on the floor, and shuffling their bodies around in imperceptibly tiny, very rapid movements.</dd>
          <br>
          <dd>One of my fellow students used to say that he thought this dance inspired modern styles such as Twerking.</dd>
          <br>
          <dt>Arctic robot dance</dt>
<dd>An interesting example of historic misinformation, English explorers in the 1960s believed to have discovered a new dance style characterized by "robotic", stilted movements, being practiced by inhabitants of Northern Alaska and Canada.</dd>
          <br>
          <dd>Later on however it was discovered that they were just moving like this because they were really cold.</dd>
          <br>

Hi JES,

Not sure I understood your problem. You want to add some space around the elements, is that it? If so, you should probably use CSS to style them.

@milc I think that is the crux of the question, yes.

@JES generally, you should never use <br> tags for adding paragraph breaks into documents. By default “block level elements” like p, div, section, article, ol, li, ul, dl, etc. always break onto a new line after they are closed. So the new next block level element will appear on a new line each time.

In addition, all browsers have a “default stylesheet”, which defines them to be like this, and also provides some rudimentary basic styling (such as a bit of padding/margin), so that documents wth no styling are still readable at a basic level.

If you want to change their spacing beyond that, you should use CSS to update their styling. You shouldn’t need to use CSS in this first assessment — some CSS is provided for you, and added to the browser styles, this is good enough for now.

The only place in which you should use <br> is inside a paragraph (or some other block level element) when you want to visually break the paragraph up using forced line breaks, uch as when you are writing an address in a formal letter:

<p>This<br>
is<br>
my<br>
address</p>

Try this in a web browser to see the difference with and wthout the <br>s, and you'll see what I mean.

Thank you very much for both of your replies!

Looks like I should start learning CSS soon but yes, I understand now why <br> is not a good tag to break paragraphs since they’re already broken at block level. I think I got a bit carried away with using this tag since I used it in the address section and started carrying them over into block level by mistake