Error: Misplaced non-space characters inside a table.

{% for birthday in birthdays %}↩

When I comment the jinja part outside the table data then it is fine. Should this just be ignored.

    <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap" rel="stylesheet">
    <link href="/static/styles.css" rel="stylesheet">
    <script src="static/nupp.js"></script>

    <div class="header">
    <div class="container">
        <div class="section">

            <h2>Add a Birthday</h2>

            <form action="/" method="Post">

                <input placeholder="Name" type="text" name="name"><br>

                <input placeholder="Month" type="number" name="month" max="12" min="1"><br>

                <input placeholder="Day" type="number" name="day" max="31" min="1"><br>

                <button type="submit">Submit</button>

        <div class="section">

            <h2>All Birthdays</h2>
            <form action="/delete" method="Post">
                <input class="delHidden" type="hidden" name="name" value="">
                        {% for birthday in birthdays %}
                            <tr class="hoverName">
                                <td>{{birthday.name}} <input class="delButton" name="{{birthday.id}}" type="submit" value="Delete"></td>
                        {% endfor %}
  • are you validating this raw html or the rendered html? (should be the rendered html) Commented Mar 12 at 10:47
  • Thanks, I was indeed validating raw html.
    – RARob
    Commented Mar 13 at 7:28

1 Answer 1


My mistake was validating raw html, this leaves the Jinja code in place (validator reads it as an error). Instead I Loaded the page (Jinja code executed) and then copied the source into validator - no errors now.

  • please accept your answer since it answered your question
    – UpAndAdam
    Commented Mar 13 at 16:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .