0
0
HTMLmarkup~5 mins

Opening and closing tags in HTML - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is an opening tag in HTML?
An opening tag is the start of an HTML element. It tells the browser to begin applying the element's effect or content. It looks like <tagname>.
Click to reveal answer
beginner
What is a closing tag in HTML?
A closing tag marks the end of an HTML element. It looks like </tagname> and tells the browser to stop applying the element's effect.
Click to reveal answer
beginner
Why do most HTML elements need both opening and closing tags?
Because the opening tag starts the element and the closing tag ends it. This helps the browser know where the element's content begins and ends, like a book chapter with a start and finish.
Click to reveal answer
beginner
Give an example of an HTML element with opening and closing tags.
Example: <p>This is a paragraph.</p> Here, <p> is the opening tag and </p> is the closing tag. The text between them is the content.
Click to reveal answer
beginner
Are there HTML tags that do not need closing tags? Give an example.
Yes, some tags are self-closing and do not need a closing tag. For example, <br> adds a line break and stands alone without a closing tag.
Click to reveal answer
Which of these is a correct opening tag for a paragraph?
A&lt;p&gt;
B&lt;/p&gt;
C&lt;paragraph&gt;
D&lt;p/&gt;
What does a closing tag look like?
A&lt;/tagname&gt;
B&lt;tagname&gt;
C&lt;tagname/&gt;
D&lt;tagname&gt;&lt;/tagname&gt;
Why do we need both opening and closing tags?
ATo make the page colorful
BTo start and end the element content
CTo add images
DTo create links only
Which tag is self-closing and does not need a closing tag?
A&lt;div&gt;
B&lt;h1&gt;
C&lt;br&gt;
D&lt;p&gt;
What is wrong with this HTML? <p>Hello World<p>
AOpening tag is wrong
BNo problem
CText should be inside &lt;div&gt;
DMissing closing tag &lt;/p&gt;
Explain what opening and closing tags are in HTML and why they are important.
Think about how a book chapter has a start and an end.
You got /3 concepts.
    Describe the difference between tags that need closing tags and self-closing tags with examples.
    Some tags stand alone, others wrap content.
    You got /3 concepts.