Skip to content

<h1> within <p> causes following closing tags to turn red #2517

@razzius

Description

@razzius

Describe the bug
Putting an <h1> tag inside of a <p> tag causes the following closing tags to turn red.

To Reproduce
Steps to reproduce the behavior:

  1. Go to popcode.org
  2. Add the following HTML:
<!DOCTYPE html>
<html>
    <head>
        <title>Funfunctionality</title>
    </head>
    <body>
        <div class="webname">
            <p>
            	<h1>Funfunctionality</h1>
            </p>
        </div>
    </body>
</html>
  1. Notice color of closing tags

Expected behavior
Since Popcode is an opinionated editor, I'd recommend an error message like:
You can't put <h1> / <h2> etc header tags inside of a paragraph element. Put them before or after the <p> tag.

Screenshots
image

Notice that the page renders; Popcode does not detect any errors.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Firefox & Chrome
  • Version Latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions