views:

36

answers:

4

I Have coded a "terms and conditions" page with numbered paragraphs as follows:

<p>1. content</p>
<p>2. more content</p>
<p>3. even more content</p>

as opposed to:

<ol>
<li>content</li>
<li>more content</li>
<li>even more content</li>
</ol>

I have been told by someone that this is extremely bad practice and is generally wrong.

Now, My question to you lot is - why?

This still validates and it is still picked up by search engines etc.

Am I being stupid or is the other person just being picky?

+3  A: 

It's mainly a question of presentation versus contents.

The first approach makes you maintain the numbering as contents, whereas the second approach displays the numbering by itself, also allowing you to customize the presentation via CSS.

In the case you have to modify the text, for example to add or remove paragraphs, using numbers explicitely will force you to edit every paragraph to either increment or decrement numbers, possibly causing errors.

I can't be sure about SEO, but if it's important that the numbering appears in Google results, for instance if people search for legal article paragraphs via official numbers, then it's important that the number appears explicitely in the text, since the ordered list doesn't specify the number format that the crawler must understand.

SirDarius
A: 

I highly doubt it has any effect on your rankings.

You should use an ordered list because that is what it was made for. Use a paragraph for paragraphs and unordered lists for lists of things with no order, etc...

Galen
So, just to reiterate - There is nothing wrong with using paragraph tags, other than there is already a tag made for numbered lists???
Neurofluxation
A: 

The ordered list is semantically correct: the markup describes the list as a list. In the stack-of-paragraphs example, the markup is semantically meaningless.

Personally, I find semantic markup easier to style, scan, and maintain (SirDarius explained the last point perfectly.)

Mathletics
+2  A: 

It comes down to semantics. Yes the other person was being picky. Yes what you were doing is not the best practice. No, what you're doing is not WRONG technically, but you can ADD VALUE to the content by using the ordered list.

Since Ordered List is a tag, it is by definition machine-readable, without any special parsing. Using just 1. 2. etc as plain text embedded withing Paragraph content is not immediately exposed to whatever machine readers / code / other automation might want to work with your content.

The OL identifies that section of your content as an ordered list. That's adding (a little) value to the content because now it's providing a little bit of meta-data about what KIND of content it is. It's a numbered list.

I know, you're saying so what?

Well, let's suppose this content is being "read" by a blind person using a text reader software, where the computer reads the HTML page, parses the content and then speaks it to the user. The user may have enabled a setting saying - okay, for every ordered list, i want you to read me one item at a time and then pause and wait for me to say "next". Or whatever - just an arbitrary example.

Basically, by providing additional (semantic) information about your content, you are enabling software, devices and other processes to work with your content in more meaningful, contextual ways.

Tom Auger
Good answer and +rep to you - thanks
Neurofluxation
Thanks! yay! My first answer.
Tom Auger