Paragraph
A paragraph is a few lines of text, a few sentences making one whole. It is also probably the most frequently used XHTML language tag. If we add at the beginning and ending of the page a few mandatory tags, we do not need more to create a simple text page.
The beginning of the parahraph is marked by „<p>“, the ending of the paragraph is marked by „</p>“. The text written between these marks will be aligned to one paragraph on the remaining page. The width of the paragraph will be set according to the width of browser window and font size – what one visitor of your page will see as three lines of text, another one can see for example as two or four lines. It is not important where we make a line break when writing; important is only placing of marks „<p>“ and „</p>“.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>A simple text page</title> </head> <body> <p>This is the first paragraph. This sentence is in the first paragraph, too. This one too.</p> <p>It is not important, where you make a line break. Do not worry about that. By the way, this is the second paragraph.</p> <p>A third one.</p> </body> </html>
Do not forget to specify a correct character encoding in the page header. The resulting page will look like this:
This is the first paragraph. This sentence is in the first paragraph, too. This one too.
It is not important, where you make a line break. Do not worry about that. By the way, this is the second paragraph.
A third one.
Try changing the size of your web browser to smaller and larger, and look how the text in paragraphs will adjust to the size of the window. Cool, isn't it?
Maybe such page looks too simple; it misses colors, pictures, and other nice things. But remember: the text is the fundament of the page (unless you are making a picture gallery, or something like that); the most difficult is to find out what you want to write, and to write it. Pictures and colors can be added later.
0 Comments:
Post a Comment
<< Home