Invalid block tag : 'endblock'. Did you forget to register or load this tag?
<p>l get stuck in this error. l'm fresh user of <code>Django</code> and l m learning it by following steps on Youtube channel. l did everything same but l got this block tag error.
here is layout1 html content:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;

&lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;title&gt;{ % block title %}{% endblock %}&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
{ % block content %}   {% endblock %}
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>index html content:</p>

<pre><code>{% extends "layout/layout1.html"%}


{% block title %}The Video page{% endblock %}


{ % block content %}


&lt;h1&gt;This is a html&lt;/h1&gt;

&lt;p&gt;This is a p tag&lt;/p&gt;

&lt;a href="http://www.noobmovies.com"&gt;Click me!&lt;/a&gt;
&lt;img src="https://upload.wikimedia.org/wikipedia/en/7/72/Anthony_Raneri.jpg"/&gt;

{% endblock % }
</code></pre>

<p>views.py content:</p>

<pre><code>from django.template.response   import TemplateResponse


# Create your views here.
def video(request):

    return TemplateResponse (request,"video/index.html",{})
</code></pre>

<p>how can l handle this problem? as l did double-check to make sure everything is typed same like Youtube channel and normally ,l did not get where l did a mistake.</p>

<p>Django didn't recognise your starting block tag, because you have a space between the <code>{</code> and the <code>%</code>.</p>

<p>You also have the same error in both start and end tags in the other template file.</p>

python html django