Overview

It’s time to start making your websites look fancier! We’ll be using HTML with your Flask apps to format your websites and today’s preparation is focused on what HTML is and how it will connect with Flask.

Basic Learning Objectives

Before class, you should be able to:

  • Explain what HTML is and its basic syntax
  • Write a basic HTML page
  • Identify Flask variables in an HTML template

Advanced Learning Objectives

After class, you should be able to:

  • Create HTML templates for your Flask app
  • Use placeholders in your HTML templates

Readings

To achieve the basic learning objectives, you should read the following before class. There is a nice open source book on web development using Flask that we’ll use periodically and you can look through further for more details on some things. For today, read:

  • Introduction - very quick intro and definitions
  • HTML - this section demonstrates what I like about this book, you can run and change the code
  • Flask Templates - how to connect Python code to HTML files (Note: that weird endif thing is Jinja syntax, you can avoid it completely, but if you want to use it, here is a cheatsheet)

Checks

Write answers to the following and bring them to class:

  • What is the first template that you want to/could make for your project?
  • What variable(s) would you pass to that template?