render_template()<\/code> function:<\/p>\nfrom flask import Flask, render_template\n\napp = Flask(__name__)\n\n@app.route('\/')\ndef index():\n return render_template('index.html')\n\nif __name__ == '__main__':\n app.run()<\/pre>\nTemplate Inheritance and Layouts<\/strong><\/p>\nJinja2's inheritance allows creating a base template with common elements (header, footer, navigation) and extending it in child templates.<\/p>\n
Base Template (base.html<\/code>):<\/strong><\/p>\n\n\n\n {% block title %}{% endblock %}<\/title>\n<\/head>\n
\n