HTML Paragraph


  • HTML Paragraph
    Paragraphs in the HTML document define by <p> tag. 
    Ex: <p>Paragraph 1 </p> 

          <p>Paragraph 2 </p> 


    Normally brosers automatically add an empty line before & after a paragraph. 
    Therefore does not needed to add line break. Remember that closing tag of the paragraph tag. Without closing tag it produce unexpected result or error.
    Inside the paragraph you can break lines by <br /> tag.
    Ex: 
    <p> This is the 1st line of the paragraph <br />
                  This is the 2nd line of the paragraph</p>


  • Why use <br />  tag instead of <br>
    It is a coding standard coming to allow in future for all browsers that is all tags required to close properly.

No comments:

Post a Comment