Last active
June 19, 2018 22:07
-
-
Save stain/96188080fd4b9376aebf6256ba1873fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<title> | |
Hello | |
</title> | |
<link href="http://example.com/" rel="canonical" /> | |
</head> | |
<body> | |
<p> | |
Welcome to | |
<a href="http://forgethtml.sourceforge.net/"> | |
ForgetHTML | |
</a> | |
</p> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> d = Document() | |
>>> d.append(Head(Title("Hello"), Link(href="http://example.com/", rel="canonical"))) | |
>>> d.append(Body(Paragraph("Welcome to", Anchor("ForgetHTML", href="http://forgethtml.sourceforge.net/")))) | |
>>> print d | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment