HTML Error: should not contain div elements

I’m building out my website and ever time I open my homepage I get the following error message:

HTML - should not contain div elements.

I’m using Bootstrap 5 and was unaware that HTML can not contain div elements? :slight_smile:

Any assistance would be helpful.

Welcome to Pinegrow! Can you share a screenshot of your error & page tree. For eg, a div tag is not allowed within a p tag, its html rules.

1 Like

If you run the Page → Check for HTML errors, Pinegrow will show you where the invalid markup is.

Here is an example in one of my Bootstrap projects… funny enough AI built this section :laughing:
The issue in this case, is a button must only contain inline content like text, span etc, a div is not valid, same as what @TechAkayy mentioned above.

1 Like

@iamliving Hi,

Yes as long if your div is nested in the body tag! And not nested in html tag without the body tag!

David