Paragraphs (p)

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Paragraphs (p)

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which tag is used to create a paragraph in HTML?
A <para>
B <p>
2. True or false: <p> is a self-closing tag and does not need a closing </p>.
A False
B True
3. Where does a <p> element display on the page?
A Inline with surrounding text
B On its own line
4. True or false: you can nest a <p> inside another <p>.
A False
B True
5. True or false: <P> with a capital P is valid HTML.
A False
B True

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1<p>This is a paragraph.</p> A<body> <p>Hello world.</p> </body>
2<p>First.</p> <p>Second.</p> B<p> elements must not be nested inside each other - each paragraph is a separate block
3<p> is a block-level element - it always starts on its own line C<p>Welcome to my page.</p>
4Every <p> opening tag must be matched with a closing </p> tag DWraps a block of text as a paragraph - displayed on its own line with space above and below
5<p>Missing close tag EEvery <p> must be closed with </p> - omitting it leaves the paragraph unclosed
6<p><p>Nested paragraph.</p></p> FTwo separate paragraph elements - each displays as its own block with spacing between them

Definitions

<p>

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
<___>Hello world</p>
2.
<p>Welcome to my site</___>
3.
<body> <___>First paragraph.</p> </body>
4.
<body> <p>Second paragraph.</___> </body>
5.
<p>Intro text.</p> <___>More details here.</p>

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A <P>This is a paragraph.</P>
B <p>Another paragraph.</p>
C <p>Third paragraph.</p>
Question 2
A <body>
B <p>First paragraph.<p>
C <p>Second paragraph.</p>
D </body>
Question 3
A <body>
B <p>Intro text.</p>
C <p>More content.<p>
D <p>Final line.</p>
Question 4
A <body>
B <p>First line.</p>
C <p>Second line.</p>
D <paragraph>Third line.</paragraph>
Question 5
A <body>
B <p>Opening paragraph.</p>
C <p>Middle text.</p>
D <p>Closing text.</p>
E <p><p>Nested paragraph.</p></p>

Answer Key

Paragraphs (p)
Section A: Quick Questions
Q1
B — <p>
Q2
A — False
Q3
B — On its own line
Q4
A — False
Q5
A — False
Section B: Match the Pairs
Q1
<p>This is a paragraph.</p> → Wraps a block of text as a paragraph - displayed on its own line with space above and below
Q2
<p>First.</p> <p>Second.</p> → Two separate paragraph elements - each displays as its own block with spacing between them
Q3
<p> is a block-level element - it always starts on its own line → <p>Welcome to my page.</p>
Q4
Every <p> opening tag must be matched with a closing </p> tag → <body> <p>Hello world.</p> </body>
Q5
<p>Missing close tag → Every <p> must be closed with </p> - omitting it leaves the paragraph unclosed
Q6
<p><p>Nested paragraph.</p></p> → <p> elements must not be nested inside each other - each paragraph is a separate block
Section C: Definitions
Q1
<p> — An HTML element that wraps a block of text as a paragraph. The browser adds spacing above and below it and displays it on its own line.
Section D: Fill in the Blanks
Q1
<p>Hello world</p>
Q2
<p>Welcome to my site</p>
Q3
<body> <p>First paragraph.</p> </body>
Q4
<body> <p>Second paragraph.</p> </body>
Q5
<p>Intro text.</p> <p>More details here.</p>
Section E: Spot the Error
Q1
A — HTML tag names must be lowercase. <P> and </P> with capital letters are non-standard. The correct form is <p> and </p>.
Q2
B — The paragraph is closed with <p> instead of </p>. A closing tag must have a forward slash before the tag name.
Q3
C — The third paragraph is closed with <p> instead of </p>. Closing tags require a forward slash: </p>.
Q4
D — <paragraph> is not a valid HTML element. The correct element for a paragraph is <p> with its closing tag </p>.
Q5
E — <p> elements must not be nested inside each other. Each paragraph should be a separate <p>text</p> element, not wrapped in another <p>.