Chapter 3.3: Line Spacing & Creating
Think of line spacing like hitting Enter on Notepad or a word document. It makes a line down right? Well line spacing is the same on HTML, only you use a tag to simulate hitting enter. In HTML its called "Breaking Rules" or the <br /> tag. If you have been experimenting as we go, you will notice that creating two paragraph tags next to each other will make a line break. Well the <br /> tag will fix having to make multiple paragraphs. Here's how it works:
<p>I have to tell you something... <br /> I am... <br /> A ROBOT!</p>
Will then create...
I have to tell you something...
I am...
A ROBOT!
Saves time and typing! Now let's move on to another field of making lines. This time the line isn't blank, but a straight line going across the entire website. This is known as "Horizontal Rules" or the <hr /> tag. This is great for dividing information or news. It can work in many different ways, here's one.
<p>When the sun explodes, the world will end</p>
<hr />
<p>Study shows that eating throughout the day is healthier than large meals</p>
<hr />
<p>Study shows that eating throughout the day is healthier than large meals</p>
Will create
When the sun explodes, the world will end
Study shows that eating throughout the day is healthier than large meals
Saves you having to spam the ------ key and makes it look better.