SiteDesignTutorial.com

All about html paragraphs.


A quick refresher... By now you know:
    • How to open a html page,
    • How to save a html page,
    • how to view source code of html page,
    • how to start a html page,
    • How to add text to html page, and save changes,
    • How to see changes in browser,
    • How to make text bold, italic, underline,
    • How to change the font size, font type, font color,
    • How to mix these tags to get the desired html page.


    If you have missed any of these, return back to the appropriate html tutorial page.


    Starting and formatting paragraphs.



    Did you guess it already? Just like other html tags, the paragraphs are represented by:


    <p>
    Full text of paragraph here.

    Another line in paragraph.
    </p>



    Try that in your html page . It looks different, doesn't it? Both the lines would have come in 1 line itself...

    To separate lines, (Start a new line ), use the following tag:


    <br>



    So the code of paragraph becomes:


    <p>
    Full text of paragraph here. <br>
    Another line in paragraph.
    </p>



    The <br> tag can be thought of as a return/ enter key press in a microsoft word document.

    Note:
    the / sign in the <p> tag means that it's a closing tag. Never forget this, otherwise you might end up with something completely different from what you expected.

    Making a full paragraph bold.




    <p>
    <b>
    Full text here.
    </b>
    </p>



    Note:
    Never forget the order of opening and closing tags. Tag opened first is closed last. Tag opened last is closed first. This is very important. If you mix this order, at the time of validating, you will keep snatching your hairrs...

    In the above example we first opened a <p> tag. Then we opened a <b> tag. Typed the text. closed the </b> tag, then closed the </p> tag.

    You can Bold, italicize, underline full paragraphs in the same way as above.

    Example of paragraphs Italics:


    <p>
    <i>
    Full text here.
    </i>
    </p>



    Example of paragraphs Underline:


    <p>
    <u>
    Full text here.
    </u>
    </p>



    Example of paragraphs Bold, and Italics:


    <p>
    <b><i>
    Full text here.
    </i></b>
    </p>



    You can mix other tags similarly.

    Using font tag with paragraphs.



    The <font> tag can be used in the same way. See this example:


    <p>
    <font size="5" face="arial" color="000000">
    Full text here.
    </font>
    </p>



    Aligning text in a paragraph.



    Sometimes you want to align text inside a paragraph. Fortunately html allows this. All you have to do is add a simple ALIGN attribute to your <p> tag. Like this:


    <p align="center">
    Center aligned text.
    </p>



    To align to right:


    <p align="right">
    Right aligned text.
    </p>



    Align to left:


    <p align="left">
    Left aligned text.
    </p>



    Note:
    By default the <p> tag will align text to left itself. So the effect of <p align="left"> and <p> is same.

    Proceed to making text into a hyperlink, ( A clickable text is called a link ).

    SiteDesignTutorial arrowHTML HyperLinks