homepage Welcome to WebmasterWorld Guest from 54.204.249.184
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

This 36 message thread spans 2 pages: 36 ( [1] 2 > >     
SEO Aspect of Coding a List That Contains Sentences
gouri




msg:4622256
 7:28 pm on Nov 9, 2013 (gmt 0)

Mods note:
Considering how this discussion has developed, I am moving this thread to HTML forum.


I am posting this in this section instead of the HTML section because this post is not about how to code something, but about what to code something so that it can be better interpreted by Google.

Some lists may contain items and some may contain sentences.

An item list may be coded in the following way:

<ul>
<li>soda</li>
<li>water</li>
</ul>

I am wondering if each item in a list consisting of several sentences instead of just a word should be coded in the same way?

<ul>
<li>Orange widgets are the best. They contain the latest features and are easy to use. The prices are also reasonable.</li>
<li>Blue widgets are also good. They contain some of the latest features and are easy to use. The prices are pretty good.</li>
</ul>

or

with the <p> tag

<ul>
<li><p>Orange widgets are the best. They contain the latest features and are easy to use. The prices are also reasonable.</p></li>
<li><p>Blue widgets are also good. They contain some of the latest features and are easy to use. The prices are pretty good.</p></li>
</ul>

Would search engines interpret the content of a several sentence bullet point in a list better if there is a <p> tag inside an <li> tag? Would the content be able to be interpreted more cohesively?

Is an item list the same as a list that has several sentence bullet points? If they are different, should they be coded differently?

I appreciate your thoughts.

[edited by: aakk9999 at 12:35 pm (utc) on Nov 10, 2013]

 

aristotle




msg:4622265
 9:40 pm on Nov 9, 2013 (gmt 0)

You should use <li> without a following <p>. Adding a <p> is redundant, and I doubt that the code would validate.

JD_Toims




msg:4622285
 12:29 am on Nov 10, 2013 (gmt 0)

1.) It is redundant.

2.) <li><p> and <li> alone are both valid HTML.

3.) Validity of HTML is not a ranking factor, so who cares?

4.) If a page is not ranking where it should the issues are way bigger than whether a <p> is used within an <li> or not -- The use/non-use of a <p> within an <li> will not make a hill of beans, or even a single bean, of difference in the results.

gouri




msg:4622289
 1:31 am on Nov 10, 2013 (gmt 0)

4.) If a page is not ranking where it should the issues are way bigger than whether a <p> is used within an <li> or not -- The use/non-use of a <p> within an <li> will not make a hill of beans, or even a single bean, of difference in the results.

Would you code a list that consists of single word items in the same way that you would code a list that consists of several sentence bullet points?

<ul>
<li>soda</li>
<li>water</li>
</ul>

and

<ul>
<li>Orange widgets are the best. They contain the latest features and are easy to use. The prices are also reasonable.</li>
<li>Blue widgets are also good. They contain some of the latest features and are easy to use. The prices are pretty good.</li>
</ul>

Would you distinguish between the two in any way in terms of how you code them?

JD_Toims




msg:4622290
 1:37 am on Nov 10, 2013 (gmt 0)

Yes, but what I would not do is code a <p> that includes a list of terms without designating the terms as a list in the source code via <ul> or <ol>.

A <p> is semantic markup in HTML that "communicates" within the source code what a reader "gets" by reading. <ul> and <ol> are essentially the same thing as a <p> to a reader -- What that means is within a <p> that contains a list of "things" it's better for source-code semantics to code it as: <p>Some text </p><ul><li>item 1<li>item 2<li>item 3</ul><p>Some other text</p> rather than coding the whole thing as a <p>.

But "going the other way" <li><p> is not necessary, because semantically within the source code <li> essentially says the same thing as <p>.

aristotle




msg:4622291
 1:43 am on Nov 10, 2013 (gmt 0)

JD_Toims
<li><p> and <li> alone are both valid HTML.

I just checked and you appear to be right. I'm surprised. What if your css styling specifies different fonts and/or font-sizes for <p> and <li>? It seems like that would create a conflict.

JD_Toims




msg:4622292
 1:56 am on Nov 10, 2013 (gmt 0)

What if your css styling specifies different fonts and/or font-sizes for <p> and <li>? It seems like that would create a conflict.

Nope -- Source-code semantics for machine readability/understanding of the content presented is one thing, but the visual presentation a "person visitor" sees is something else.

One thing I try to keep in mind when coding [I hand write all the source code for my sites and most I work on] is what I put in the HTML source is "what a machine gets" but how I make it look is "what a person gets".



An example of what I mean is there are times when I'll say "Here's a list of 4 things for you to remember in the order they are presented: 1, 2, 3, 4."

To a person it looks like a single <p> due to the presentation via css.
In the HTML source code so a "bot" or "machine" would "get the same thing" it would be coded as:

<p>Here's a list of 4 things for you to remember in the order they are presented: <ol style="list-style-type:none;padding:0;margin:0;display:inline;"><li>1, <li>2, <li>3, <li>4</ol>.</p>

JD_Toims




msg:4622293
 2:29 am on Nov 10, 2013 (gmt 0)

I guess I should note: An alternative, essentially the same, HTML coding method of the preceding example for people to "get" as well as a bot or machine would be the following.

<p style="display:inline">Here's a list of 4 things for you to remember in the order they are presented: </p><ol style="list-style-type:none;padding:0;margin:0;display:inline;"><li>1, <li>2, <li>3, <li>4</ol><p style="display:inline">.</p>

lucy24




msg:4622302
 6:18 am on Nov 10, 2013 (gmt 0)

I doubt that the code would validate.

You can put almost anything inside a <li> -- up to and including a whole nother list -- so why cavil at a <p>?

It's common to think of lists only in terms of
--item1
--item2
--item3
but there are situations where you really want a semantic list structure even though the individual items are quite long, up to multiple paragraphs. Think of a book with sections and subsections. You might choose to structure the whole thing as a list. I've got one 85k file that's entirely made up of lists: 4 uber-lists, with subsidiaries, some of them containing paragraphs and even a couple of tables. The semantics require it.

I couldn't experiment as much as I wanted, because right-now-as-we-speak the validator isn't feeling well. But in general lists are pretty analogous to tables in how they interact with paragraphs. In each case, there's an outer element that can only contain a specified child:
table > tr (with optional intervening tbody)
tr > td
ul or ol > li
Once you get to the inmost child, you can put absolutely anything inside it: paragraph, div, a whole new list.

If you say something like
<p><ul><li>blahblah
there's no error yet. But creating the <ul> -- or <ol> or <table> -- implicitly closes the <p>, so you'll get the error further along when you say </p>.

What if your css styling specifies different fonts and/or font-sizes for <p> and <li>? It seems like that would create a conflict.

Anything that has one element inside another element is a potential conflict-- but css includes ways of conflict resolution.

p {blahblah1}
li {blahblah2}


If "blahblah1" and "blahblah2" are mutually exclusive, the displayed form will be the one for <li>, because later rules override earlier rules, all things being equal.

li {blahblah2}
p {blahblah1}


All things being equal, the displayed form will be the one for <p>.

If the the two things are not mutually exclusive, both will be used.

For one thing inside of another thing:

li p {blahblah3}

(As noted above, the reverse isn't allowed.)

Things get really interesting when you've got

p.someclass {blahblah5}
li p {blahblah6}


and then your html calls for p.someclass inside of li. At this point there may be judgement calls among browsers. (In my experience it goes with li p, but I'm not certain this is carved in stone.) But there's always a way to force the presentation you want-- without resorting to
!important flags.
aristotle




msg:4622329
 12:23 pm on Nov 10, 2013 (gmt 0)

Thanks for the explanations JD and Lucy. I hand code my sites too even though I don't have your advanced knowledge. Somehow I manage by just using what I do know and always checking the final code at W3C. Unfortunately my first post led into a discussion that should have been in the coding forum. Anyway, it's good to have real experts available who are willing to take the time to step in and give such detail explanations. Thanks again.

gouri




msg:4622368
 4:55 pm on Nov 10, 2013 (gmt 0)

What that means is within a <p> that contains a list of "things" it's better for source-code semantics to code it as: <p>Some text </p><ul><li>item 1<li>item 2<li>item 3</ul><p>Some other text</p> rather than coding the whole thing as a <p>.

JD_Toims,

If I was coding a list that contains single words for item 1, item 2 , and item 3, I think that I would code it as you have. Some text within <p>...</p> to introduce the list, then the list coded as you have it, and then some text within <p>...</p> after the list to maybe summarize what I just wrote in the list.

If you have several sentences for each <li>...</li>, however, instead of 1 word, would you code it the same way?

lucy24,

It's common to think of lists only in terms of
--item1
--item2
--item3
but there are situations where you really want a semantic list structure even though the individual items are quite long, up to multiple paragraphs.

That is what I am saying. Sometimes, the individual items are more than a word or two, and in those situations, how would you code it?

What you wrote about which rule takes precedence when coding is something that I think will come up when I code the list that I mention in this thread, but it is going to take me a little time to understand it. Your examples really help.

lucy24




msg:4622407
 1:30 am on Nov 11, 2013 (gmt 0)

how would you code it?

Truthfully I may be the wrong person to ask, because when I first started doing HTML I skipped the "lists" section of the UIUC tutorial. So I only started using lists about 5, 10 years ago. I never, ever use list format in e-books where the printed original has numbered paragraphs, because I consider those numbers part of a now-static text. We're not going to channel the author (d. 1886) and ask if he wants to add an item between #8 and #9.

Functionally there is no limit to how long a list-item can be. My boilerplate css lumps together li and p for generic properties like line-height. One possible criterion is: suppose the css breaks, so all lists default to block-level elements marked with a bullet.

There are several ways to launder your widget:
--running water {detailed description here}
--sonic vibrations {detailed description here}
--dry cleaning {detailed description here}

Would this work? It might look silly if you hadn't intended the list to display that way. But if the layout would look flat-out ridiculous, then you may not want a list.

Looking strictly at The Rules, it is just as permissible to put a <p> inside a <li> as it is to put a <p> inside a <td>. Analogously again: if you're using a table for layout, you're going about it wrong. But if you're presenting a whole lot of information, and there really is a relationship between items in both directions, it's a table.

It may help again to remember that html is really a glorified word processor.* If you want to use counters, you do it by making a list. It can be done other ways, but a list is by far the most straightforward.


* A few people hereabouts
:: carefully avoiding eye contact ::
actually use html for this purpose.

aristotle




msg:4622597
 8:11 pm on Nov 11, 2013 (gmt 0)

gouri
Personally I try to keep everything simple and straightforward. From the examples you've provided I don't see any reason why you would need to "mix" <p> and <li>. What's wrong with just doing it the obvious simple way, as follows:

<p>Here is a list:</p>
<ul>
<li>Orange widgets are the best. They contain the latest features and are easy to use. The prices are also reasonable.</li>
<li>Blue widgets are also good. They contain some of the latest features and are easy to use. The prices are pretty good.</li>
</ul>
<p>As you can see from the above list, blah blah blah</p>

. . . . . . . . . . . . . . .

You can even make a kind of "list" just using <p> alone. For example:

<p>Here is a "list": </p>

<p style="text-indent: 50px">-- Orange widgets are the best. They contain the latest features and are easy to use. The prices are also reasonable.</p>

<p style="text-indent: 50px">-- Blue widgets are also good. They contain some of the latest features and are easy to use. The prices are pretty good.</p>

<p>As you can see from the above list, blah blah blah</p>

In other words, increase the amount of the indent, and put a dash in front of each sentence. When rendered, it will look like a list. If you don't like inline styling, you can define a p.list (with a special indent) in your style sheet and use it.

lucy24




msg:4622658
 3:40 am on Nov 12, 2013 (gmt 0)

you can define a p.list

Or preferably a div.list p ;)

JD_Toims




msg:4622673
 6:18 am on Nov 12, 2013 (gmt 0)

If you have several sentences for each <li>...</li>, however, instead of 1 word, would you code it the same way?

Yes. You're thinking of a <p> as a "paragraph" as defined in English 101 or [archaically] as carriage a return on a typewriter, but from the HTML docs, even though the <li> display=inline example I gave first works, it's not even technically correct, the second one is.

List elements (in particular, ol and ul elements) cannot be children of p elements. When a sentence contains a bulleted list, therefore, one might wonder how it should be marked up.

The solution is to realise that a paragraph, in HTML terms, is not a logical concept, but a structural one. In the fantastic example above, there are actually five paragraphs as defined by this specification: one before the list, one for each bullet, and one after the list.

The markup for the above example could therefore be:

<p>For instance, this fantastic sentence has bullets relating to</p>
<ul>
<li>wizards,
<li>faster-than-light travel, and
<li>telepathy,
</ul>
<p>and is further discussed below.</p>

Authors wishing to conveniently style such "logical" paragraphs consisting of multiple "structural" paragraphs can use the div element instead of the p element.

Thus for instance the above example could become the following:

<div>For instance, this fantastic sentence has bullets relating to
<ul>
<li>wizards,
<li>faster-than-light travel, and
<li>telepathy,
</ul>
and is further discussed below.</div>

Semantically, <li> and <p> are essentially the same thing.

Source = http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-p-element

Honestly though, search engines "try to 'get the point' enough" to where this discussion or the exact coding really isn't going to impact rankings in any way, shape, or form -- What I mean is: if you want to use <li><p> go ahead, but if you want to be semantically correct with the least HTML possible, then just use <li>.

phranque




msg:4622687
 8:18 am on Nov 12, 2013 (gmt 0)

Semantically, <li> and <p> are essentially the same thing.

<li> certainly has a semantic meaning.

http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-p-element
...a paragraph, in HTML terms, is not a logical concept, but a structural one.

i think this is saying that a paragraph (the <p> element) has no semantic meaning.

JD_Toims




msg:4622708
 9:26 am on Nov 12, 2013 (gmt 0)

How did I know if I didn't come back and edit my previous post we'd get into hair splitting when I thought the point/context of the post in this discussion made it clear to use <li><p> or <li>, because it has to be interpreted the same way by search engines?

Maybe, I should just defer to others from now on rather than hoping someone can get something actionable out of my drivel in the context it's presented?



<self-snip>




This entire discussion has been about a <p> within an <li> and whether or not it's necessary. Not once has it included the idea of eliminating the <li>.

If they're (meaning <li> followed by <p> and <li> alone, for those who are not following the context of the discussion) not "semantically the same" in the context of the entire 15 post thread I made the statement in, then why do the docs say:

In the fantastic example above, there are actually five paragraphs as defined by this specification: one before the list, one for each bullet, and one after the list.

whatson




msg:4622717
 10:29 am on Nov 12, 2013 (gmt 0)

Is the same true for <div><p></p></div>
Should you always have p tags in divs?

lucy24




msg:4622741
 11:12 am on Nov 12, 2013 (gmt 0)

Should you always have p tags in divs?

You don't have to. But the whole point of a <div> is that it can contain other stuff. If there's nothing structurally inside it, why not stick with a <p> in the first place?

When I first picked up CSS I used a lot of naked <div>s. But that's because I had a really hard time wrapping my brain around the idea that you can attach classes to <p> --or any other pre-defined element such as <li>-- just as readily as to <div>. I now only use <div> in this way-- as a pseudo-<p> --when I'm planning to put other stuff inside it:
div.para {exact same styling as my default p here}

What was the question again? Oh, right, do search engines care? Naah, probably not. Use whatever is convenient for you.
li.para {exact same styling as your default p here}

Sometimes markup may make a difference. F'rinstance search engines might be more inclined to recognize local anchors if you attach them to an <h-something>. But that's headers.

gouri




msg:4622994
 5:02 pm on Nov 13, 2013 (gmt 0)

Let me first say thank you to all of you for your responses.

I think from what you guys are saying, there might be a couple of ways to code a list, and putting a <p> inside an <li> when you have a several sentence bullet point may not be necessary in terms of helping the search engines to view the few sentences in the bullet point more cohesively, and including the <p> inside an <li> is not going to help get more traffic? The <li> is also seen as a paragraph so the <p> does not have to be included?

@JD_Toims,

I appreciate the W3 link and the including of its text in this thread.

but from the HTML docs, even though the <li> display=inline example I gave first works, it's not even technically correct, the second one is.

Can you tell me which is the second one?

@lucy24,

Sometimes markup may make a difference. F'rinstance search engines might be more inclined to recognize local anchors if you attach them to an <h-something>. But that's headers.

When you say this, do you mean that when the anchor link on a page is clicked, it takes you to an h2 tag on that page? This might make the local anchor more recognizable to the search engines?

I am just using h2 as an example; it could be another heading tag.

@aristotle,

<p>Here is a list:</p>
<ul>
<li>Orange widgets are the best. They contain the latest features and are easy to use. The prices are also reasonable.</li>
<li>Blue widgets are also good. They contain some of the latest features and are easy to use. The prices are pretty good.</li>
</ul>
<p>As you can see from the above list, blah blah blah</p>

If I didn't have the paragraph at the end, so it is just the paragraph at the top and the two bullet points

<p>Here is a list:</p>
<ul>
<li>Orange widgets are the best. They contain the latest features and are easy to use. The prices are also reasonable.</li>
<li>Blue widgets are also good. They contain some of the latest features and are easy to use. The prices are pretty good.</li>
</ul>

would that change how you code the bullet points? Would you include a <p> inside an <li> in this situation?

aristotle




msg:4623062
 7:47 pm on Nov 13, 2013 (gmt 0)

If I didn't have the paragraph at the end, so it is just the paragraph at the top and the two bullet points

<p>Here is a list:</p>
<ul>
<li>Orange widgets are the best. They contain the latest features and are easy to use. The prices are also reasonable.</li>
<li>Blue widgets are also good. They contain some of the latest features and are easy to use. The prices are pretty good.</li>
</ul>

would that change how you code the bullet points? Would you include a <p> inside an <li> in this situation?

Well I don't see why it would matter what follows the end of the list, whether it's a <p> or <h2> or <blockquote> or something else. Also, as I mentioned before, It seems to me that adding a <p> inside an <li> creates an unnecessary redundancy, at least in this case. If you're asking me what I would do, I would just use <li> alone.

lucy24




msg:4623064
 7:49 pm on Nov 13, 2013 (gmt 0)

The <li> is also seen as a paragraph so the <p> does not have to be included?

Depends what you mean by paragraph. A list item is, by default, a block-level element, meaning that it displays on a line by itself. So there would normally be no reason to say
<li><p>blahblah</p></li>
if that's what you were originally thinking of. At least not for search-engine purposes; you might do it for CSS reasons.

You might conceivably have
<li>
<p>blahblah</p>
<p>blahblah</p>
</li>

and/or
<li>blahblah
<p>blahblah</p>
</li>

but only if the list item contains more than one paragraph.

do you mean that when the anchor link on a page is clicked, it takes you to an h2 tag on that page? This might make the local anchor more recognizable to the search engines?

This part is pure hypothesis on my part. On the rare occasions when I get a search-engine visit to a #fragment, the <a> element is-- as far as I can remember-- always inside a header, like
<h3><a name = "blahblah" id = "blahblah">Header Text</a></h3>
I don't know whether search engines actually evaluate anchors differently depending on how they're coded:
--separate <a> tag vs. name/id attribute attached to element itself
--if <a> tag, then inline <a> vs. <a> associated with a block-level element
or even
--"name" attribute vs. "id" attribute *


* I think all modern browsers use id. But SubEthaEdit uses name for its internal navigation, so I continue to use both.

JD_Toims




msg:4623098
 11:39 pm on Nov 13, 2013 (gmt 0)

Can you tell me which is the second one?

This one is what I meant by second -- I didn't read back through the whole tread and remembered I had it coded differently, so my posts 1 & 3 are "the way it should be" coded -- Sorry about the confusion:

I guess I should note: An alternative, essentially the same, HTML coding method of the preceding example for people to "get" as well as a bot or machine would be the following.

<p style="display:inline">Here's a list of 4 things for you to remember in the order they are presented: </p><ol style="list-style-type:none;padding:0;margin:0;display:inline;"><li>1, <li>2, <li>3, <li>4</ol><p style="display:inline">.</p>

The reason it's "essentially the same as" this one:

<p>Here's a list of 4 things for you to remember in the order they are presented: <ol style="list-style-type:none;padding:0;margin:0;display:inline;"><li>1, <li>2, <li>3, <li>4</ol>.</p>

Is, as a search engine that's "trying to figure out wtf the coder means," you really have to treat [consider] <p><ul><li></ul></p> either the same as <div><ul><li></ul></div> or the same as <p></p><ul><li></ul><p></p> -- You don't have many options in how you interpret it if your goal is to "get the meaning".

If you used "context clues" from the page:

You could likely, imo, fairly reliably determine the "intent" of the coder with a page coded as:
<p>Text here</p>
<p>More text</p>
<p>Other text</p>
<p>Even more text and a list of <ul><li>things <li>stuff </ul> goes here</p>
<p>With a conclusion</p>

Is for the <ul> to be "considered part of" the <p> as it would if the "technically correct" <div> was used rather than a <p>.

###

You could, also likely imo, fairly reliably determine the "intent" of the coder with a page coded as:

<p>Text here followed by a list</p>
<ul><li>things <li>stuff </ul>
<p>More text</p>

<p>Other text followed by a list</p>
<ul><li>things <li>stuff </ul>
<p>With even more text here</p>

<p>Even more text and a list of
<ul><li>things <li>stuff </ul>
goes here</p>

<p>With a conclusion</p>

Is for the <ul> to be "more stand-alone" in some way, but they forgot the first closing </p> and the second opening <p> for some reason.



In either case, via context clues based on the surrounding coding, you can make what I would think is a fairly reliable "guess" as to "what the coder means" and can handle each in the way you've chosen to handle different coding -- It could be you treat the two types as exactly the same or slightly different, depending on the entire process in place for algorithmic understanding relating to the "semantics" of a page.

JD_Toims




msg:4623108
 12:05 am on Nov 14, 2013 (gmt 0)

Well I don't see why it would matter what follows the end of the list, whether it's a <p> or <h2> or <blockquote> or something else.

It actually does matter -- The following are for grouping content.

4.5 Grouping content

4.5.1 The p element
4.5.2 The hr element
4.5.3 The pre element
4.5.4 The blockquote element
4.5.5 The ol element
4.5.6 The ul element
4.5.7 The li element
4.5.8 The dl element
4.5.9 The dt element
4.5.10 The dd element
4.5.11 The figure element
4.5.12 The figcaption element
4.5.13 The div element
4.5.14 The main element

The following are for sectioning content.

4.4 Sections

4.4.1 The body element
4.4.2 The article element
4.4.3 The section element
4.4.4 The nav element
4.4.5 The aside element
4.4.6 The h1, h2, h3, h4, h5, and h6 elements
4.4.7 The header element
4.4.8 The footer element
4.4.9 The address element
4.4.10 Headings and sections
4.4.10.1 Creating an outline
4.4.10.2 Sample outlines
4.4.11 Usage summary
4.4.11.1 Article or section?

Note the inclusion of h2 in "sectioning", but not "grouping".

<p> and most of the other markup mentioned in this thread "group content", but an <hN> implicitly says <section>.

For the sake of understandability, I think it's best to think of "grouping" elements and their content as "pieces" of the whole of a "section" of the presented content/document.

Meaning, when you use <div>,<p>,<ol>,<ul>, etc. you're essentially saying "keep this content together as a 'piece' of the entire 'section' it's in."

When you use a "sectioning" element, you're basically, again as simply as I can say it for understandability, saying, "This the start of a new 'section', which is comprised of any/all the following 'pieces' specified."

So, when you follow a <div>,<p>,<ol>,<ul>, etc. with an <hN> tag, by implicitly creating a new section, which is comprised of the following "pieces", you're essentially saying, "the preceding 'piece' is part of the preceding 'section' and should be grouped as such for understandability."

Hopes the rambling explanation makes sense to someone besides me lol

JD_Toims




msg:4623114
 12:38 am on Nov 14, 2013 (gmt 0)

I think I have an example that will make sense of the differences, so hopefully my triple reply will be okay.

Think of HTML as pie...

Document = The whole pie.
Section = The portion people are given.
Pieces [groupings] = The ingredients people eat.

In trying to "get" HTML you, imo, should be able to "start with the pie [document]", then "cut the portions [section it]", and let people "taste the ingredients [read the pieces]" -- In other words, the "ingredients" [pieces / grouping(s)] of a "portion" [section] of a "pie" [document] are usually what people "feast on", and if you can't identify those as a search engine, you likely can't "serve the best results", but the responsibility does not completely fall on search engines for "understanding" what's being "fed to people" on any given website, because if someone "just codes whatever where ever" and a search engine can't "put the ingredients together" then the "pie" [website] doesn't ever get "served".

[edited by: JD_Toims at 1:04 am (utc) on Nov 14, 2013]

aristotle




msg:4623116
 12:42 am on Nov 14, 2013 (gmt 0)

JD- Thanks for that explanation. If I understood gouri's question, it was whether what followed the list would affect the choice between using <li> alone or <li><p> within the list. I didn't think it should and so said it didn't matter what followed for making that decision. If it does matter, could you give some examples of the differences?
Thanks

JD_Toims




msg:4623119
 12:48 am on Nov 14, 2013 (gmt 0)

I didn't think it should and so said it didn't matter what followed for making that decision. If it does matter, could you give some examples of the differences?

No, you're correct and I may have misread/misunderstood your post a bit -- A <p> is not ever necessary within an <li> *unless* there should be multiple groupings [<p>s] within the <li>, then they should be used.

If you were saying "what follows" has no bearing on how an <li> should be coded, then you're absolutely correct and sorry for "rambling on" about how "what follows" can make an overall difference in "where things go" or "what they're part of" in the "bigger picture" of a web page.

SevenCubed




msg:4623126
 1:06 am on Nov 14, 2013 (gmt 0)

I've been trying to follow this thread but I don't understand the complexity of the answers.

Can anyone tell me if my reasoning is right or wrong as I understand, and have always applied, li's and p's...

<li>attribute of a thought</li>
<p>the whole thought</p>

@JD_Toims...is your pie rectangular or round, who baked it, and what was wrong with the first two that required a third one to be baked?

JD_Toims




msg:4623134
 1:57 am on Nov 14, 2013 (gmt 0)

It's round LOL

Let me try to clarify more...

The "pie" is the entirety of the document -- A document can be one page or multiple pages.

The size of the "portions people get" start with each "sectioning element" and end with the end of the "sectioning element" or implicitly with the beginning of the next "sectioning element." -- This could be on one page, or multiple pages since <body> and <hN> are sectioning elements.

The "grouping" [what I referred to as ingredients or pieces] are what "go together" to make up a "section", so...

A document is made up of sections that are made up of groupings.

lucy24




msg:4623153
 5:10 am on Nov 14, 2013 (gmt 0)

<li>attribute of a thought</li>
<p>the whole thought</p>


How widely do your thoughts sprawl? For me, one directory is a thought. Result: most pages don't have an <h1>, because I think of them as subsidiary to the directory-index page. I've had to use enormous willpower even to go to <h2> when it's in a subdirectory.


With all this talk about lists I found myself wondering if it's ever appropriate to say
<ul>
<li>only-one-item</li>
</ul>
I think yes, it is; I thought of two situations right away and I'm sure there are others.

This 36 message thread spans 2 pages: 36 ( [1] 2 > >
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved