How to Use Line Breaks in HTML

The line break is a basic part of HTML. Before HTML wizards and add-on technologies, the line break was a real implementer of HTML format. When a designer wanted to create space, it was using line break commands. Line breaks still constitute a vital part of HTML coding, but may be hidden in code or changed to other tag formats as technologies like CSS and browser-oriented readers change the way web sites are coded.

Instructions

    • 1

      Learn the tag. It is simple: < br > is inserted anywhere in HTML that the designer wants to make a line break. (Note, because of formatting restrictions, here there are spaces between the brackets and the br characters. In your code, there should be no spaces there.)

    • 2

      Put your cursor where you want the line break to be.

    • 3

      Enter your tag.

    • 4

      Check that the tag is before the new line of text.

    • 5

      Go back to your page preview to make sure that the text is spaced the way you want it.

Tips & Warnings

  • To use line breaks in HTML, you have to understand that HTML does not recognize the white space in your text editor. Typing in HTML code on a different line does not make the page text appear on a different line. That's what line breaks are for.

  • As an example of line break usage, consider this: anywhere a line break is added, the text will be shifted down one line. For example: entering Hello < br > World in HTML will produce the following:
    Hello
    World

  • If you need to really space text out, you can rely on a whole lot of line breaks. It works, but it's not very sophisticated. Try to find out about new technologies before trying to move a lot of text with line breaks.

Related Searches:

Resources

Comments

You May Also Like

Related Ads

Featured