skip to Main Content

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?

2

Answers


  1. Chosen as BEST ANSWER

    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.


  2. Use this. It will be correctly.

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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search