user2461410
user2461410

Reputation: 21

HTML5 validation error "Text not allowed in element ul in this context."

I'm trying to validate a website made with html5 and i'm getting the error "Text not allowed in element ul in this context." What i have there it's this code:

<div class="span-1">
<ul>O CLUBE
<li><a href="/clube/historial">Historial</a></li>
<li><a href="/clube/missao-e-valores">Missão e valores</a></li>
<li><a href="/clube/palmares">Palmarés</a></li>
</ul>
</div>

The error is the "li" tag

What's wrong where?

Regards, Vitor Neves

Upvotes: 2

Views: 9484

Answers (1)

Yelko
Yelko

Reputation: 64

The error is the text "O CLUBE", you cant put it there because you are using an unorder list (UL) and it just can contain li's not text. You can do that

<div class="span-1">
    <span>O CLUBE</span>
    <ul>
        <li><a href="/clube/historial">Historial</a></li>
        <li><a href="/clube/missao-e-valores">Missão e valores</a></li>
        <li><a href="/clube/palmares">Palmarés</a></li>
    </ul>
</div>

Upvotes: 3

Related Questions