HTML Invalid Nesting
Some elements cannot contain others (e.g. <p> cannot contain block elements). Invalid nesting causes parse errors.
Common causes
- <p> containing <div>.
- Inline inside block wrongly.
How to fix
- Check spec: which elements can contain which.
- Move or change element types.
FAQ
- Can p contain div?
- No. p only phrasing content.
- Where check nesting?
- HTML spec or validator.
Fix it now
Try in validator (prefill this example)