Monday 9 July 2012

How To Create A New Paragraph And Change Its Alignment In HTML?

HTML AlignmentIn this HTML tutorial, I am going to teach you how to create a new paragraph in HTML and control its alignment? Create a paragraph and controlling its alignment is very easy in HTML. Just you need to remember <P> paragraph tag and its attributes like Left, Right, Center and Justify.

Create a New Paragraph
You can use paragraph tags to start new paragraphs in an HTML document. In a word processing program, you press Enter or Return to separate blocks of text. Web browsers do not read these line breaks. Instead, you must insert a <P> tag in your HTML any time you want to start a new paragraph in your Web page. Paragraphs are left-aligned by default, but you can choose a different alignment using the align tags.

Creating a new paragraph in HTML:
<p>
MyComputerTuts is a free Computer Tutorials blog. In this blog, you can learn HTML tutorials, CSS tutorials, Photoshop Tutorials, Dreamweaver tutorials and other web designing and web programming tutorials.
</p>
Change Paragraph Alignment
You can control the horizontal positioning, or alignment, of your paragraphs using the ALIGN attribute. You can choose to align a paragraph to the left, right, or center, or justify the text so it is aligned on both the left and the right. Paragraphs are left-aligned by default.

You can use the ALIGN attribute within numerous tag elements, including headings and lists. For example, you can center a heading or right-align a bulleted list.

Here are some examples of aligning a paragraph in HTML:

To align the paragraph right side of the page.
<p align="right">
MyComputerTuts is a free Computer Tutorials blog. In this blog, you can learn HTML tutorials, CSS tutorials, Photoshop Tutorials, Dreamweaver tutorials and other web designing and web programming tutorials.
</p>
To align the paragraph left side of the page.
<p align="left">
MyComputerTuts is a free Computer Tutorials blog. In this blog, you can learn HTML tutorials, CSS tutorials, Photoshop Tutorials, Dreamweaver tutorials and other web designing and web programming tutorials.
</p>
To align the paragraph center of the page.
<p align="center">
MyComputerTuts is a free Computer Tutorials blog. In this blog, you can learn HTML tutorials, CSS tutorials, Photoshop Tutorials, Dreamweaver tutorials and other web designing and web programming tutorials.
</p>
To justify the paragraph.
<p align="justify">
MyComputerTuts is a free Computer Tutorials blog. In this blog, you can learn HTML tutorials, CSS tutorials, Photoshop Tutorials, Dreamweaver tutorials and other web designing and web programming tutorials.
</p>
In the above tutorial, I have mentioned every possible alignment that you can use with a paragraph in HTML. Hope you have enjoy this article. Keep visiting this blog more wonderful tutorials like this.

0 Responses to “How To Create A New Paragraph And Change Its Alignment In HTML?”

Post a Comment

Hi Readers!

Please give your valuable responses and suggestions.