4. HTML

file = open("hello.html", "w")
file.write(
    """<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset = "utf-8">
    <title>Page Title</title>
</head>
<body>
    Hello!
</body>
</html>"""
)
file.close()

Test the program above.

Activity: 4.1 ActiveCode (ac_l23_4_en)

Data file: hello.html
You have attempted 1 of 3 activities on this page