Line breaks are a little different from the other tags mentioned so far. Line breaks can be thought of as pressing ENTER in a text editor, the cursor moves down to the start of a new line. You use the <br /> tag to create a line break.
Line breaks in HTML are also different in the fact that they can't contain any content. that is why we close them within the same tag by using a />. In the past we could just use <br> to create a line break, but since the web is moving towards XHTML, we need to use the XHTML standard of closing every tag.
My Name<br />Job Title<br />Work Phone Number
My Name Job Title Work Phone Number
As we can see everytime we used a <br /> tag, all the text after it started on a new line.
Comments
Post new comment