Paragraphs can be formatted in HTML as we do formatting in word processing program. Here the align attribute is used to “justify” our paragraph.
Example:
<p align=”justify”>
People run into confusion when programming because of some lack of understanding of the basics. With this in mind, we are going to slowly go over key OOP principles while creating our own PHP objects. With this knowledge, you will be able to explore OOP further.
</p>
People run into confusion when programming because of some lack of understanding of the basics. With this in mind, we are going to slowly go over key OOP principles while creating our own PHP objects. With this knowledge, you will be able to explore OOP further.
Paragraph Centering
Example:
<p align=”center”>People run into confusion when programming because of some lack of understanding of the basics. With this in mind, we are going to slowly go over key OOP principles while creating our own PHP objects. With this knowledge, you will be able to explore OOP further. Every line of the paragraph above is now aligned to the right hand side of the display box.
</p>
People run into confusion when programming because of some lack of understanding of the basics. With this in mind, we are going to slowly go over key OOP principles while creating our own PHP objects. With this knowledge, you will be able to explore OOP further. Each line of the paragraph has now been centered inside the display window.
Paragraph Align Right
Example:
<p align=”right”>People run into confusion when programming because of some lack of understanding of the basics. With this in mind, we are going to slowly go over key OOP principles while creating our own PHP objects. With this knowledge, you will be able to explore OOP further. Every line of the paragraph above is now aligned to the right hand side of the display box.
</p>
People run into confusion when programming because of some lack of understanding of the basics. With this in mind, we are going to slowly go over key OOP principles while creating our own PHP objects. With this knowledge, you will be able to explore OOP further. Every line of the paragraph above is now aligned to the right hand side of the display box.
Line Breaks
<br> tag is called the line break tag. It ends the line you are currenly on and resumes on the next line, same as the carriage return in word processor.
<br> tag is an empty tag i.e. it doesn’t have an end tag so we end the tag in the begining itself as <br/>.
Example:
<p>
Will Mateson<br />
Box 61<br />
Cleveland, Ohio<br />
</p>
Address:
Will Mateson
Box 61
Cleveland, Ohio
Horizontal Rules (Lines)
The <hr /> tag is also an empty tag and is used to put an horizontal line in the document wherever needed.
Example:
<p>This is a paragraph</p>
<hr />
<p>This is a paragraph</p>
<hr />
<p>This is a paragraph</p>
This is a paragraph
…………………….
This is a paragraph
…………………….
This is a paragraph