A div is a block element and can not be inside a p element.
It is important to note that just because a browser shows something does not make it valid xhtml / html. Most browsers including Preview will silently fix broken html on the fly. This leads to a disconnect between locations specified in Preview (that autofixes) and the "broken" code in CodeView. Which is why MendHTML exists as a tool as it builds the CodeView code up from the autofixed version of the DOM tree built by Preview or in this case the gumbo parser.
Last edited by KevinH; 08-22-2023 at 02:41 PM.
|