First Webpage

Test FastHTML’s capabilities
page = Html(
    Head(Title('Some page')),
    Body(Div('Some text, ', A('A link', href='https://example.com'), Img(src="https:/placehold.co/200"), cls='myclass')))
print(to_xml(page))
<html>
  <head>
    <title>Some page</title>
  </head>
  <body>
    <div class="myclass">
Some text, 
      <a href="https://example.com">A link</a>
      <img src="https:/placehold.co/200">
    </div>
  </body>
</html>
show(page)
Some page
Some text, A link

source

home

 home ()
def foo(): pass