Aan de slagGa gratis aan de slag

From Tree to HTML

Here you are given the chance to create your own bit of HTML code (as a python string). More specifically, below is an HTML tree image and you will finish the missing code within the string html which produces this HTML tree.

html_tree_exercise.png

To note:

  • We have started the string html for you, to help nudge you in the correct direction.
  • The spacing we use in the portion of the string we provide (e.g., indenting <head> two spaces more than <html>) isn't necessary, but we did so just to make it easier to read.

Deze oefening maakt deel uit van de cursus

Web Scraping in Python

Cursus bekijken

Oefeninstructies

  • Fill in the blank within the string variable html so that the HTML code matches its tree representation (including the text within the two paragraph children).

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

html = '''

  
    Intro HTML
  
  ____

'''
Code bewerken en uitvoeren