0
我只是想知道,它是正确/推荐的方式来省略Doctype,头部和身体标签?因为至少Django的教程做它,可以看出在tutorial 3, 在民意测验/模板/调查/ index.html的:Django教程模板无头,正文和Doctype?
{% if latest_question_list %}
<ul>
{% for question in latest_question_list %}
<li><a href="/polls/{{ question.id }}/">{{ question.question_text }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>No polls are available.</p>
{% endif %}
教程代码包含示例。由于假定学习者已经知道html,所以它们保持简短和最小化,并且还有许多关于如何构造html文档的其他参考资料。 –