# Validator error ul \> ul

**URL:** https://forum.pinegrow.com/t/validator-error-ul-ul/6207
**Category:** Beginners
**Created:** [February 1, 2022, 8:39pm UTC](https://forum.pinegrow.com/t/validator-error-ul-ul/6207 "2022-02-01T20:39:22Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![kat](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/kat/32/2221_2.png) [@kat](https://forum.pinegrow.com/u/kat)
#### Post date: [February 1, 2022, 8:39pm UTC](https://forum.pinegrow.com/t/validator-error-ul-ul/6207/1 "2022-02-01T20:39:22Z")

</div>

I have a ul with 2 li in it and a ul with 3 li inside the 1st url. Clarification what this error from [https://validator.w3.org](https://validator.w3.org) means please. (Thanks David @AllMediaLab for introducing me to this great resource.)

 ![Screen Shot 2022-01-31 at 9.57.15 AM](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/e/e26398a26c02212b9eb8aa7a7b6ff87efb486a94.png)

Element [`ul`](https://html.spec.whatwg.org/multipage/#the-ul-element) not allowed as child of element [`ul`](https://html.spec.whatwg.org/multipage/#the-ul-element) in this context. (Suppressing further errors from this subtree.)

From line 178, column 25; to line 178, column 28

` <ul>↩ `

Contexts in which element [`ul`](https://html.spec.whatwg.org/multipage/#the-ul-element) may be used:

Where [flow content](https://html.spec.whatwg.org/multipage/#flow-content-2) is expected.

Content model for element [`ul`](https://html.spec.whatwg.org/multipage/#the-ul-element):

Zero or more `li` and [script-supporting](https://html.spec.whatwg.org/multipage/#script-supporting-elements-2) elements

---

<div class="post-metadata">

### Author: ![AllMediaLab](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/allmedialab/32/2079_2.png) [@AllMediaLab](https://forum.pinegrow.com/u/AllMediaLab)
#### Post date: [February 2, 2022, 8:33am UTC](https://forum.pinegrow.com/t/validator-error-ul-ul/6207/2 "2022-02-02T08:33:13Z")

</div>

Hi @kat Kathleen,

You are nesting a list in a list here:

```auto
 <div class="pricing-box"><span class="price">Choose Your Option</span>
                    <h2>Tax Deductions</h2>
                    <ul>
                        <li>
                            <i class="far fa-arrow-alt-circle-right"></i> 
                            Once-a-year membership donation.
                        </li>
                        <li>
                            <i class="far fa-arrow-alt-circle-right"></i> A particular Poetry.LA series or a single episode for screen credit:
                        </li>
                        <ul>
                            <li>
                                <i class="far fa-hand-point-right"></i> Poetry.LA Interview Series hosted by Mariano Zaro
                            </li>
                            <li>
                                <i class="far fa-edit"></i> A Poem By hosted by Lisa Grove
                            </li>
                            <li>
                                <i class="far fa-moon"></i> They Write by Night hosted by Suzanne Lummis
                        </ul>                         
                    </ul><a class="btn" href="#"><b>Sign Up</b></a>

```

My advice is keep things simple and use one list and if needed style parts of the `<li>`.with padding.

Ecstatically I think your better of Aligning your list text and icons left (default settings of a list), what looks nice on paper doesn’t always look good on the web!

Regards,

David

---

<div class="post-metadata">

### Author: ![AllMediaLab](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/allmedialab/32/2079_2.png) [@AllMediaLab](https://forum.pinegrow.com/u/AllMediaLab)
#### Post date: [February 2, 2022, 8:46am UTC](https://forum.pinegrow.com/t/validator-error-ul-ul/6207/3 "2022-02-02T08:46:10Z")

</div>

The other error about missing headings in a `<section>` is simple, just change the `<section>` part in `<div>`  
So this:

```auto
 <!-- Mini menu -->
        <section class="mini-Menu">
            <div class="btnRead btn"><a href="#">17 Virtual Readings List</a>
            </div>
            <div class="btnLGBTQ btn"><a href="#">LGBTQ + Literary Connections</a>
            </div>
            <div class="Donate btn"><a href="#Donate">Donate</a>
            </div>
            <div class="social-icons">
                <span><a href="https://www.twitter.com" target="_blank"><i class="fab fa-twitter"></i></a></span>
                <span><a href="https://www.facebook.com"><i class="fab fa-facebook-f"></i></a></span>
                <span><a href="https://www.youtube.com"><i class="fab fa-youtube"></i></a></span>
                <span><a href="https://www.instagram.com"><i class="fab fa-instagram"></i></a></span>
            </div>
        </section>
        <!-- End Mini menu -->

```

Becomes this:

```auto
 <!-- Mini menu -->
        <div class="mini-Menu">
            <div class="btnRead btn"><a href="#">17 Virtual Readings List</a>
            </div>
            <div class="btnLGBTQ btn"><a href="#">LGBTQ + Literary Connections</a>
            </div>
            <div class="Donate btn"><a href="#Donate">Donate</a>
            </div>
            <div class="social-icons">
                <span><a href="https://www.twitter.com" target="_blank"><i class="fab fa-twitter"></i></a></span>
                <span><a href="https://www.facebook.com"><i class="fab fa-facebook-f"></i></a></span>
                <span><a href="https://www.youtube.com"><i class="fab fa-youtube"></i></a></span>
                <span><a href="https://www.instagram.com"><i class="fab fa-instagram"></i></a></span>
            </div>
        </div>
        <!-- End Mini menu -->

```

---

<div class="post-metadata">

### Author: ![kat](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/kat/32/2221_2.png) [@kat](https://forum.pinegrow.com/u/kat)
#### Post date: [February 2, 2022, 2:45pm UTC](https://forum.pinegrow.com/t/validator-error-ul-ul/6207/4 "2022-02-02T14:45:59Z")

</div>

> [@AllMediaLab](#):
>
> style parts of the `<li>` .with padding

If I use 1 ul is there a better way to align with :ninth childs on each li?

Actually I think the list icons look lousy. Any thoughts on better list styling?

---

<div class="post-metadata">

### Author: ![kat](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/kat/32/2221_2.png) [@kat](https://forum.pinegrow.com/u/kat)
#### Post date: [February 2, 2022, 2:48pm UTC](https://forum.pinegrow.com/t/validator-error-ul-ul/6207/5 "2022-02-02T14:48:20Z")

</div>

> [@AllMediaLab](#):
>
> The other error about missing headings in a `<section>` is simple, just change the `<section>` part in `<div>`

I had thought sections needing headings was just a warning not a rule ; )  
I’ll change them to divs.

---

<div class="post-metadata">

### Author: ![AllMediaLab](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/allmedialab/32/2079_2.png) [@AllMediaLab](https://forum.pinegrow.com/u/AllMediaLab)
#### Post date: [February 2, 2022, 2:53pm UTC](https://forum.pinegrow.com/t/validator-error-ul-ul/6207/6 "2022-02-02T14:53:03Z")

</div>

Yes it’s a warning! But I always want to get rid of every waring and error. But that’s just me.

---

<div class="post-metadata">

### Author: ![abirana](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/abirana/32/4162_2.png) [@abirana](https://forum.pinegrow.com/u/abirana)
#### Post date: [February 2, 2022, 3:57pm UTC](https://forum.pinegrow.com/t/validator-error-ul-ul/6207/7 "2022-02-02T15:57:03Z")

</div>

> [@kat](#):
>
> Element [`ul`](https://html.spec.whatwg.org/multipage/#the-ul-element) not allowed as child of element [`ul`](https://html.spec.whatwg.org/multipage/#the-ul-element) in this context. (Suppressing further errors from this subtree.)

This means **ul** cannot be direct child of **ul** , but **ul** can be inside **li**.

Your implementation should be something like this:

```auto
<ul>
    <li>...</li>
    <li>...</li>
    <li>
        <ul>
            <li>...</li>
            <li>...</li>
            <li>...</li>
        </ul>
    </li>
    <li>...</li>
    <li>...</li>
</ul>

```

---

<div class="post-metadata">

### Author: ![kat](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/kat/32/2221_2.png) [@kat](https://forum.pinegrow.com/u/kat)
#### Post date: [February 2, 2022, 4:37pm UTC](https://forum.pinegrow.com/t/validator-error-ul-ul/6207/8 "2022-02-02T16:37:23Z")

</div>

> [@abirana](#):
>
> This means **ul** cannot be direct child of **ul** , but **ul** can be inside **li**.

Confused. Below is ok, or not ok.

```auto
 <div class="pricing-box"><span class="price">Choose Your Option</span>
                    <h2>Tax Deductions</h2>
                    <ul>
                        <li>
                            <i class="far fa-arrow-alt-circle-right"></i> 
                            Once-a-year membership donation.
                        </li>
                        <li>
                            <i class="far fa-arrow-alt-circle-right"></i> A particular Poetry.LA series or a single episode for screen credit:
                        </li>
                        <ul>
                            <li>
                                <i class="far fa-hand-point-right"></i> Poetry.LA Interview Series hosted by Mariano Zaro
                            </li>
                            <li>
                                <i class="far fa-edit"></i> A Poem By hosted by Lisa Grove
                            </li>
                            <li>
                                <i class="far fa-moon"></i> They Write by Night hosted by Suzanne Lummis
                        </ul>                         
                    </ul><a class="btn" href="#"><b>Sign Up</b></a>

```

---

<div class="post-metadata">

### Author: ![AllMediaLab](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/allmedialab/32/2079_2.png) [@AllMediaLab](https://forum.pinegrow.com/u/AllMediaLab)
#### Post date: [February 2, 2022, 4:48pm UTC](https://forum.pinegrow.com/t/validator-error-ul-ul/6207/9 "2022-02-02T16:48:20Z")

</div>

> [@abirana](#):
>
> ```auto
> <ul>
> <li>...</li>
> <li>...</li>
> <li>
> <ul>
> <li>...</li>
> <li>...</li>
> <li>...</li>
> </ul>
> </li>
> <li>...</li>
> <li>...</li>
> </ul>
> 
> ```

This is what he means the nesting should be like that not like your example. But looking at what you want to achieve I would keep it simple. Don’t see a reason to use it for your example!

The `<ul>` is nested in the `<li>` but when you are a beginner it can be very confusing.

---

<div class="post-metadata">

### Author: ![abirana](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/abirana/32/4162_2.png) [@abirana](https://forum.pinegrow.com/u/abirana)
#### Post date: [February 2, 2022, 4:59pm UTC](https://forum.pinegrow.com/t/validator-error-ul-ul/6207/10 "2022-02-02T16:59:27Z")

</div>

Your second **ul** should be inside a **li**  
Like **ul \> li \> ul \> li**

---

<div class="post-metadata">

### Author: ![AllMediaLab](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/allmedialab/32/2079_2.png) [@AllMediaLab](https://forum.pinegrow.com/u/AllMediaLab)
#### Post date: [February 2, 2022, 6:02pm UTC](https://forum.pinegrow.com/t/validator-error-ul-ul/6207/11 "2022-02-02T18:02:03Z")

</div>

> [@kat](#):
>
> Actually I think the list icons look lousy. Any thoughts on better list styling?

Here some examples of lists with code like this cool one (click on the edit on code pen icon to see it):  
https://codepen.io/ahmadnasr/embed/preview/MZjyxg?default-tabs=html%2Cresult&height=300&host=https%3A%2F%2Fcodepen.io&slug-hash=MZjyxg

> **[FreeFrontend](https://freefrontend.com/css-lists/)**
>
> Free hand-picked HTML, CSS and JavaScript (jQuery, React, Vue) code examples, tutorials and articles.

When they have SCSS instead of CSS just covert the SCSS to CSS here:

> **[Best SCSS to CSS Converter Online](https://jsonformatter.org/scss-to-css)**
>
> Secure and Best way to convert SCSS to CSS format Online. This SCSS Compiler is playground for SCSS.

---

<div class="post-metadata">

### Author: ![kat](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/kat/32/2221_2.png) [@kat](https://forum.pinegrow.com/u/kat)
#### Post date: [February 2, 2022, 6:56pm UTC](https://forum.pinegrow.com/t/validator-error-ul-ul/6207/12 "2022-02-02T18:56:24Z")

</div>

New list styles -exciting!.

I got rid of sections except in the youtube video section which is linked to css/FastEmbed.css and assets/FastEmbed.js.

---

<div class="post-metadata">

### Author: ![nebula](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/nebula/32/3567_2.png) [@nebula](https://forum.pinegrow.com/u/nebula)
#### Post date: [February 5, 2022, 8:44pm UTC](https://forum.pinegrow.com/t/validator-error-ul-ul/6207/13 "2022-02-05T20:44:36Z")

</div>

@kat, based on your screenshot, your “sublist” provides detail to the second item in the main list. The way you create that relationship in the code is to insert the sublist _inside_ the second item, after the text of the second item. It doesn’t make sense to have a sublist that’s not associated with a parent item, so HTML doesn’t allow it. And neither does writing in general.

---

<div class="post-metadata">

### Author: ![kat](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/kat/32/2221_2.png) [@kat](https://forum.pinegrow.com/u/kat)
#### Post date: [February 5, 2022, 10:22pm UTC](https://forum.pinegrow.com/t/validator-error-ul-ul/6207/14 "2022-02-05T22:22:27Z")

</div>

> [@nebula](#):
>
> The way you create that relationship in the code is to insert the sublist _inside_ the second item, after the text of the second item.

Originally I had it that way, but was advised to change it. I do agree that there should be a better relationship.

> [@AllMediaLab](#):
>
> You are nesting a list in a list here  
> My advice is keep things simple and use one list and if needed style parts of the `<li>` .with padding.

---

<div class="post-metadata">

### Author: ![nebula](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/nebula/32/3567_2.png) [@nebula](https://forum.pinegrow.com/u/nebula)
#### Post date: [February 5, 2022, 11:15pm UTC](https://forum.pinegrow.com/t/validator-error-ul-ul/6207/15 "2022-02-05T23:15:10Z")

</div>

HTML lists are designed to be nested. Taking a shortcut like AllMediaLab suggested defeats the purpose of HTML, which is designed for defining the meaningful relationships between various chunks of content.

Styling is done separately using CSS. If you didn’t do any styling at all (used only HTML), the HTML should still show that the sublist provides detail for that item because it’ll be appropriately indented. Then you can use styling to fine-tune the precise look and position of the HTML elements.
