Explanation: Create a view: This defines a function that handles requests and returns a response. Create a template: This defines the HTML structure of your page. Render the template: The render function takes the request, template path, and context data as arguments. It replaces placeholders in the template with values from the context..
# views.py
from django.shortcuts import render
def index(request):
context = {'name': 'World'}
return render(request, 'myapp/index.html', context)
# index.html
<!DOCTYPE html>
<html>
<head>
<title>Hello, World!</title>
</head>
<body>
<h1>Hello, {{ name }}!</h1>
</body>
</html>