Tagsoup
code:tagtree
[ TagLeaf
( TagOpen "!DOCTYPE"
[
( "html"
, ""
)
]
)
, TagLeaf ( TagText "" )
, TagBranch "html"
[
( "lang"
, "en"
)
]
[ TagLeaf ( TagText "" )
, TagBranch "head"[]
[ TagLeaf ( TagText "
" )
, TagLeaf
( TagOpen "meta"
[
( "charset"
, "UTF-8"
)
]
)
, TagLeaf ( TagText "
" )
, TagLeaf
( TagOpen "meta"
[
( "name"
, "viewport"
)
,
( "content"
, "width=device-width, initial-scale=1.0"
)
]
)
, TagLeaf ( TagText "
" )
, TagLeaf
( TagOpen "meta"
[
( "http-equiv"
, "X-UA-Compatible"
)
,
( "content"
, "ie=edge"
)
]
)
, TagLeaf ( TagText "
" )
, TagLeaf ( TagText "" )
]
, TagLeaf ( TagText "" )
, TagBranch "body"[]
[ TagLeaf ( TagText "
" )
, TagLeaf ( TagText "
" )
, TagBranch "a"
[
( "href"
, "www.yahoo.co.jp"
)
, TagLeaf ( TagText "
" )
, TagBranch "div"
[
( "class"
, "main-article"
)
]
[ TagLeaf ( TagText "
" )
, TagLeaf ( TagText "
" )
]
, TagLeaf ( TagText "
" )
, TagBranch "article"[]
[ TagLeaf ( TagText "
" )
, TagLeaf ( TagText "
" )
]
, TagLeaf ( TagText "" )
]
, TagLeaf ( TagText "" )
]
]
code:index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<h1>Hello world</h1>
<a href="www.yahoo.co.jp">Yahoo</a>
<div class="main-article">
<h3>This is main article</h3>
</div>
<!-- Comment test -->
<article>
<span>SPAN</span>
</article>
</body>
</html>