.. _html:
HTML
====
Ultimately, Pages in Drafter become HTML. Although you can use functions like ``Button`` and ``Link`` to create HTML
elements, you can also embed HTML in the string literals that you return for the page. For example, the following
page will render a button that links to the Google homepage:
.. code-block:: python
from drafter import *
@route
def index() -> Page:
return Page([
"
Go to Google
",
'Google'
])
start_server()
This is a very simple example, but it demonstrates how you can use HTML to create pages. You can also use HTML to
modify text, add images, and more.
.. code-block:: python
from drafter import *
@route
def index() -> Page:
return Page([
"This text will be bolded.
",
"This text will be italicized.
",
"This text will be underlined.
",
"This text will be strikethrough.
",
])
start_server()