2

I'm making an user list, and it looks like this

User A
User B
--
User C
User D

and I wrote my HTML like this:

<ul>
    <li>User A</li>
    <li>User B</li>
    <li class="divider"></li>
    <li>User C</li>
    <li>User D</li>
</ul>

Should I care about if SEO or some crawlers get an empty <li> content or not?

Yami Odymel
  • 1,782
  • 3
  • 22
  • 48

2 Answers2

4

After I read How do I semantically group a header with a UL in HTML?

and How to semantically add heading to a list

I realized that I should write my HTML in this way:

<ul>
    <li>User A</li>
    <li>User B</li>
</ul>
<div class="divider"></div>
<ul>
    <li>User C</li>
    <li>User D</li>
</ul>

Or

<ul>
    <li>User A</li>
    <li>User B</li>
</ul>
<hr>
<ul>
    <li>User C</li>
    <li>User D</li>
</ul>

Not sure if I should keep this question open or not.

Community
  • 1
  • 1
Yami Odymel
  • 1,782
  • 3
  • 22
  • 48
  • This doesn't make any sense, you are creating 2 lists, when you only want one list with a divider in a middle, CSS can do that by itself – dippas Sep 24 '16 at 09:26
  • 2
    I generally use

  • for a separator, that way it should still look ok without css – Ben Cummins Sep 24 '16 at 09:30
  • I'm just thinking about should I separate them into 2 lists already or not, since I decided to make a divider in the middle of them .. – Yami Odymel Sep 24 '16 at 09:32