For your code to be valid you can’t put any tag inside a <ul>
other than an <li>
.
You can however, put any block level element inside the <li>
, like so:
<ul>
<li>
<h2>...</h2>
<p>...</p>
<p>...</p>
</li>
</ul>
More Related Contents:
- In CSS Flexbox, why are there no “justify-items” and “justify-self” properties?
- Margin on child element moves parent element
- Make a div into a link
- Padding for Inline Elements
- Is it wrong to change a block element to inline with CSS if it contains another block element?
- Is quoting the value of url() really necessary?
- How do I center align horizontal menu?
- Why are CSS named grid areas not in quotes?
- Should I avoid using !important in CSS?
- IE 8: background-size fix [duplicate]
- CSS: Hover one element, effect for multiple elements?
- xHTML/CSS: How to make inner div get 100% width minus another div width
- Invalid CSS selector causes rule to be dropped: What is the rationale?
- Cols, colgroups and css “:hover” pseudoclass
- Is it valid to have paragraph elements inside of a heading tag in HTML5 (P inside H1)?
- CSS Justify text, fill space with dots [duplicate]
- Replacing H1 text with a logo image: best method for SEO and accessibility?
- For div to extend full height
- html5 vertical spacing issue with
- CSS Parent/Ancestor Selector [duplicate]
- Select inputs and text inputs in HTML – Best way to make equal width?
- Vertical and horizontal align (middle and center) with CSS [duplicate]
- Can a CSS pixel be a fraction?
- What does font-size really correspond to?
- Why and not taking font-family and font-size from body?
- how to set background image in submit button?
- Why shouldn’t I use position:absolute for positioning everything?
- How does flex-wrap work with align-self, align-items and align-content?
- Media query to detect if device is touchscreen
- Every item to have the same width as the widest element [duplicate]