HTML Tags Tutor
Paragraph Tag
The paragraph tag is used to place paragraphs on a web page. Text is typed between the tags.
<p></p>
Lesson steps
Click the <> button to enter your code
Type the code shown here for a paragraph tag in the editor window:
<p>This is my first web page and this is my first paragraph.</p>
Click Preview button.
|
|
Add Font Family
Click the <> button to return to the code.
Add the inline style code to the opening paragraph tag as shown in red:
<p style="font-family: verdana">
Click Preview button.
|
Add Font Size
Click the <> button to return to the code.
Add additional code as shown in red:
<p style="font-family: verdana; font-size: 12pt">
Click Preview button.
|
Add Text Align
Click the <> button to return to the code.
Add additional code as shown in red:
<p style="font-family: verdana; font-size: 12pt; text-align: left">
Click Preview button.
|
Add Indentation
Click the <> button to return to the code.
Add additional code as shown in red:
<p style="font-family: verdana; font-size: 12pt; text-align: left; text-indent: 1em">
Click Preview button.
|
Lesson Notes
The paragraph tag will work if you forget the closing tag. For W3C compliance you should include it.
When adding inline style declarations, use a semi colon to separate them. If these same declarations were defined in the head section using the style tag the code would look like this:
<head>
<style type="text/css">
p {
font-family: verdana;
font-size: 12pt;
text-align: left;
text-indent: 1em
}
<style>
</head>
|
Property of
Net Success 2000 Plus Inc
Po Box 1508
Somerset KY 42502
Last Modified: November 10, 2008
|
| |