The following exercises involve Python sockets, HTTP, and HTML. Post the files (one Python file and one HTML file) containing your solutions to Moodle for HW14.
- Modify the Python "socket" program from class so that it:
- Prints the received HTTP status code to the console.
- Saves the data it receives to a file. Only the data from the requested file should be saved; the HTTP header should not be saved.
- Create a HTML file for a basic web page. Specifically, your web page should contain:
- Your name, as a heading (use <h1> tags).
- A paragraph of text about something that interests you (use <p> tags).
- An unordered list (use <ul> and <li> tags).
- Some text marked as important or emphasized (use <strong> or <em> tags).
- A link to another web page (use <a> tags).
- Start by modifying the simple html file from class. (You can use the Python program from above to get the simple HTML file!)
- To view the HTML source for any web page, see these instructions. You can then save the source to your computer and modify it in a text editor.
- For help with HTML tags, see Introduction to HTML or the HTML Tag Reference.