What happens if we put raw text directly in the <ul> element?


#1

Question

What happens if we put raw text directly in the <ul> element?

Answer

Browsers are designed to be very lenient and highly error tolerant so in this case the text would display on the page. However, it would not be displayed as a list and this is not best practice as it defies the HTML5 specification.

To ensure that our HTML adheres to standards, we should run it through a validator.


FAQ: Learn HTML Elements - Intro to HTML - Unordered Lists