HTML and CSS Reference
In-Depth Information
Of course, you could use the p
element to make a list…
It wouldn't be hard to make a list using the <p> element.
It would end up looking something like this:
1. Red Segway
2. Blue Segway
But there are lots of reasons not to.
You should be sensing a common theme by now. You
always want to choose the HTML element that is closest
in meaning to the structure of your content. If this is a
list, let's use a list element. Doing so gives the browser and
you (as you'll see later in the topic) the most power and
flexibility to display the content in a useful manner.
Remember, it's
important to use the
right tool for the job, and
the <p> element is NOT the
right tool for this job.
Why not use <p> to make lists?
(Choose all that apply.)
A. HTML has an element for lists.
If you use that, then the browser
knows the text is a list, and can
display it in the best way possible.
B. The paragraph element is really
meant for paragraphs of text, not
C. It probably wouldn't look
much like a list, just a bunch of
numbered paragraphs.
D. If you wanted to change the
order of the list, or insert a new
item, you'd have to renumber
them all. That would suck.
Search WWH ::

Custom Search