Django block content

I am trying out block content in my django project but when i type in my code in a html file like so

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <div class="a">
        {% block content %}
        {% endblock %}

{% block content %}

{% endblock %}

these two codes won't work and they don't turn yellow as they should. could somebody help me?

If it doesn't turn yellow,

You can check if you are using the "django" high light template in your vscode

or you are just using "HTML" template

However, i don't suggest you to turn to "django" highlight. Because most of your code are written in "HTML"

And if your code isn't work, you can check the file which is based on this file.

I guess the file you show is a basic file

May you please show me the file that is based on it? or it's hard to tell your mistake

Back to Top