We talked about paragraphs and how they work and how they rap now, let’s take a look at how to make paragraph in notepad plus plus.
We have a document a fully formed XHTML document with all the front matter at the top and in the content of the document. We have one paragraph element and it’s there too there have the paragraph tag and the close tag and some text in between and down here at the bottom. This document is opened through the browser with the paragraph that will be displayed on the screen. So the paragraph wraps nicely you’ll notice that the paragraph is justified on the left it’s aligned flush on the left and it’s ragged on the right and this is the default alignment for a paragraph in XHTML and HTML.Let’s take a look at how to change that I’m going to add an attribute to the paragraph here say a line equals right in quotes. So this is what an attribute looks like in XHTML you have the attribute name and an equal sign and the argument to the attribute is in quotes I tend to use double quotes single quotes also work just fine. This is how it’s formed you have the left angle bracket and then the name of the tag which is a P tag in this case for the paragraph. and then you have some space it can be any amount of white space you can have new lines here you can have any amount of legal white space and then the name of the attribute, in this case, is a line which tells the paragraph. How to do its alignment and an equal sign and the argument in quotes and in this case the argument is the word right RH EHT and a closed angle bracket and then you have the closed tag down here with the content in the middle. I’m going to go ahead and save this what we expect to have happened when we reload in the browser is that the right side will be flushed the left side will be ragged.I’ll go ahead and hit reload and there we have it the right side of the paragraph is now flush and the left side is ragged. That’s the right alignment there are two other alignments available one is called justify. This makes both sides of the paragraph flush and then we have the left side is flush and the right side is full and the other alignment is Center which makes it ragged on both sides all of the contents centered in between and there we have Center the default option, of course, is left and so we saw that without any argument in the alignment.You can also do it this way if you want to explicitly assign it you can say a line equals left and reload in the browser. We have that flush on the left and ragged on the right as we did with the default arrangement and so that is the alignment attribute to the paragraph tag and its various options.