13. How to create a horizontal line

13. How to create a horizontal line

You've probably seen horizontal lines or horizontal rules on many different websites.

Putting a horizontal rule on a page can help make things easier to read by splitting up the page into parts.

To create a horizontal rule, use the <hr /> tag. Since <hr /> is a block element, you musn't place them inside a span or other inline element.

1) Let's put an <hr /> between the two paragraphs.

2) Now save and we'll see how it looks.

This is how the page looked before.

And this is how it looks now, with the horizontal rule added. Yours may not look exactly like this; it depends on your browser.

This completes the tutorial. You now know how to use the <hr /> tag to create a horizontal rule.

  • 0 Uživatelům pomohlo
Byla tato odpověď nápomocná?

Související články

2. An introduction to coding web pages with XHTML

2. An introduction to coding web pages with XHTML In this series of tutorials, you will learn...

3. How is XHTML different from HTML?

3. How is XHTML different from HTML? If you watched the previous tutorial, you'll know that...

5. Some resources you should know about before you begin

5. Some resources you should know about before you begin Before we begin, you should know...

4. Choosing a text editor for web development

4. Choosing a text editor for web development In this tutorial, we will discuss the factors...

6. How to quickly open a local web page in your browser

6. How to quickly open a local web page in your browser They may seem obvious to some, but...