html5ever 0.12.0

High-performance browser-grade HTML5 parser
Documentation
#data
<body><template>Hello</template>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         "Hello"

#data
<template>Hello</template>
#errors
no doctype
#document
| <html>
|   <head>
|     <template>
|       content
|         "Hello"
|   <body>

#data
<template></template><div></div>
#errors
no doctype
#document
| <html>
|   <head>
|     <template>
|       content
|   <body>
|     <div>

#data
<html><template>Hello</template>
#errors
no doctype
#document
| <html>
|   <head>
|     <template>
|       content
|         "Hello"
|   <body>

#data
<head><template><div></div></template></head>
#errors
no doctype
#document
| <html>
|   <head>
|     <template>
|       content
|         <div>
|   <body>

#data
<div><template><div><span></template><b>
#errors
 * (1,6) missing DOCTYPE
 * (1,38) mismatched template end tag
 * (1,41) unexpected end of file
#document
| <html>
|   <head>
|   <body>
|     <div>
|       <template>
|         content
|           <div>
|             <span>
|       <b>

#data
<div><template></div>Hello
#errors
 * (1,6) missing DOCTYPE
 * (1,22) unexpected token in template
 * (1,27) unexpected end of file in template
 * (1,27) unexpected end of file
#document
| <html>
|   <head>
|   <body>
|     <div>
|       <template>
|         content
|           "Hello"

#data
<div></template></div>
#errors
 * (1,6) missing DOCTYPE
 * (1,17) unexpected template end tag
#document
| <html>
|   <head>
|   <body>
|     <div>

#data
<table><template></template></table>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <template>
|         content

#data
<table><template></template></div>
#errors
 * (1,8) missing DOCTYPE
 * (1,35) unexpected token in table - foster parenting
 * (1,35) unexpected end tag
 * (1,35) unexpected end of file
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <template>
|         content

#data
<table><div><template></template></div>
#errors
 * (1,8) missing DOCTYPE
 * (1,13) unexpected token in table - foster parenting
 * (1,40) unexpected token in table - foster parenting
 * (1,40) unexpected end of file
#document
| <html>
|   <head>
|   <body>
|     <div>
|       <template>
|         content
|     <table>

#data
<table><template></template><div></div>
#errors
no doctype
bad div in table
bad /div in table
eof in table
#document
| <html>
|   <head>
|   <body>
|     <div>
|     <table>
|       <template>
|         content

#data
<table>   <template></template></table>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <table>
|       "   "
|       <template>
|         content

#data
<table><tbody><template></template></tbody>
#errors
no doctype
eof in table
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <tbody>
|         <template>
|           content

#data
<table><tbody><template></tbody></template>
#errors
no doctype
bad /tbody
eof in table
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <tbody>
|         <template>
|           content

#data
<table><tbody><template></template></tbody></table>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <tbody>
|         <template>
|           content

#data
<table><thead><template></template></thead>
#errors
no doctype
eof in table
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <thead>
|         <template>
|           content

#data
<table><tfoot><template></template></tfoot>
#errors
no doctype
eof in table
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <tfoot>
|         <template>
|           content

#data
<select><template></template></select>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <select>
|       <template>
|         content

#data
<select><template><option></option></template></select>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <select>
|       <template>
|         content
|           <option>

#data
<template><option></option></select><option></option></template>
#errors
no doctype
bad /select
#document
| <html>
|   <head>
|     <template>
|       content
|         <option>
|         <option>
|   <body>

#data
<select><template></template><option></select>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <select>
|       <template>
|         content
|       <option>

#data
<select><option><template></template></select>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <select>
|       <option>
|         <template>
|           content

#data
<select><template>
#errors
no doctype
eof in template
eof in select
#document
| <html>
|   <head>
|   <body>
|     <select>
|       <template>
|         content

#data
<select><option></option><template>
#errors
no doctype
eof in template
eof in select
#document
| <html>
|   <head>
|   <body>
|     <select>
|       <option>
|       <template>
|         content

#data
<select><option></option><template><option>
#errors
no doctype
eof in template
eof in select
#document
| <html>
|   <head>
|   <body>
|     <select>
|       <option>
|       <template>
|         content
|           <option>

#data
<table><thead><template><td></template></table>
#errors
 * (1,8) missing DOCTYPE
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <thead>
|         <template>
|           content
|             <td>

#data
<table><template><thead></template></table>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <template>
|         content
|           <thead>

#data
<body><table><template><td></tr><div></template></table>
#errors
no doctype
bad </tr>
missing </div>
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <template>
|         content
|           <td>
|             <div>

#data
<table><template><thead></template></thead></table>
#errors
no doctype
bad /thead after /template
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <template>
|         content
|           <thead>

#data
<table><thead><template><tr></template></table>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <thead>
|         <template>
|           content
|             <tr>

#data
<table><template><tr></template></table>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <template>
|         content
|           <tr>

#data
<table><tr><template><td>
#errors
no doctype
eof in template
eof in table
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <tbody>
|         <tr>
|           <template>
|             content
|               <td>

#data
<table><template><tr><template><td></template></tr></template></table>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <template>
|         content
|           <tr>
|             <template>
|               content
|                 <td>

#data
<table><template><tr><template><td></td></template></tr></template></table>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <template>
|         content
|           <tr>
|             <template>
|               content
|                 <td>

#data
<table><template><td></template>
#errors
no doctype
eof in table
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <template>
|         content
|           <td>

#data
<body><template><td></td></template>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <td>

#data
<body><template><template><tr></tr></template><td></td></template>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <template>
|           content
|             <tr>
|         <td>

#data
<table><colgroup><template><col>
#errors
no doctype
eof in template
eof in table
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <colgroup>
|         <template>
|           content
|             <col>

#data
<frameset><template><frame></frame></template></frameset>
#errors
 * (1,11) missing DOCTYPE
 * (1,21) unexpected start tag token
 * (1,36) unexpected end tag token
 * (1,47) unexpected end tag token
#document
| <html>
|   <head>
|   <frameset>
|     <frame>

#data
<template><frame></frame></frameset><frame></frame></template>
#errors
 * (1,11) missing DOCTYPE
 * (1,18) unexpected start tag
 * (1,26) unexpected end tag
 * (1,37) unexpected end tag
 * (1,44) unexpected start tag
 * (1,52) unexpected end tag
#document
| <html>
|   <head>
|     <template>
|       content
|   <body>

#data
<template><div><frameset><span></span></div><span></span></template>
#errors
no doctype
bad frameset
#document
| <html>
|   <head>
|     <template>
|       content
|         <div>
|           <span>
|         <span>
|   <body>

#data
<body><template><div><frameset><span></span></div><span></span></template></body>
#errors
no doctype
bad frameset
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <div>
|           <span>
|         <span>

#data
<body><template><script>var i = 1;</script><td></td></template>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <script>
|           "var i = 1;"
|         <td>

#data
<body><template><tr><div></div></tr></template>
#errors
no doctype
foster-parented div
foster-parented /div
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <tr>
|         <div>

#data
<body><template><tr></tr><td></td></template>
#errors
no doctype
unexpected <td>
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <tr>
|         <tr>
|           <td>

#data
<body><template><td></td></tr><td></td></template>
#errors
no doctype
bad </tr>
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <td>
|         <td>

#data
<body><template><td></td><tbody><td></td></template>
#errors
no doctype
bad <tbody>
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <td>
|         <td>

#data
<body><template><td></td><caption></caption><td></td></template>
#errors
 * (1,7) missing DOCTYPE
 * (1,35) unexpected start tag in table row
 * (1,45) unexpected end tag in table row
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <td>
|         <td>

#data
<body><template><td></td><colgroup></caption><td></td></template>
#errors
 * (1,7) missing DOCTYPE
 * (1,36) unexpected start tag in table row
 * (1,46) unexpected end tag in table row
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <td>
|         <td>

#data
<body><template><td></td></table><td></td></template>
#errors
no doctype
bad </table>
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <td>
|         <td>

#data
<body><template><tr></tr><tbody><tr></tr></template>
#errors
no doctype
bad <tbody>
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <tr>
|         <tr>

#data
<body><template><tr></tr><caption><tr></tr></template>
#errors
no doctype
bad <caption>
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <tr>
|         <tr>

#data
<body><template><tr></tr></table><tr></tr></template>
#errors
no doctype
bad </table>
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <tr>
|         <tr>

#data
<body><template><thead></thead><caption></caption><tbody></tbody></template>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <thead>
|         <caption>
|         <tbody>

#data
<body><template><thead></thead></table><tbody></tbody></template></body>
#errors
no doctype
bad </table>
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <thead>
|         <tbody>

#data
<body><template><div><tr></tr></div></template>
#errors
no doctype
bad tr
bad /tr
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <div>

#data
<body><template><em>Hello</em></template>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <em>
|           "Hello"

#data
<body><template><!--comment--></template>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <!-- comment -->

#data
<body><template><style></style><td></td></template>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <style>
|         <td>

#data
<body><template><meta><td></td></template>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <meta>
|         <td>

#data
<body><template><link><td></td></template>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <link>
|         <td>

#data
<body><template><template><tr></tr></template><td></td></template>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <template>
|           content
|             <tr>
|         <td>

#data
<body><table><colgroup><template><col></col></template></colgroup></table></body>
#errors
no doctype
bad /col
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <colgroup>
|         <template>
|           content
|             <col>

#data
<body a=b><template><div></div><body c=d><div></div></body></template></body>
#errors
no doctype
bad <body>
bad </body>
#document
| <html>
|   <head>
|   <body>
|     a="b"
|     <template>
|       content
|         <div>
|         <div>

#data
<html a=b><template><div><html b=c><span></template>
#errors
no doctype
bad <html>
missing end tags in template
#document
| <html>
|   a="b"
|   <head>
|     <template>
|       content
|         <div>
|           <span>
|   <body>

#data
<html a=b><template><col></col><html b=c><col></col></template>
#errors
no doctype
bad /col
bad html
bad /col
#document
| <html>
|   a="b"
|   <head>
|     <template>
|       content
|         <col>
|         <col>
|   <body>

#data
<html a=b><template><frame></frame><html b=c><frame></frame></template>
#errors
no doctype
bad frame
bad /frame
bad html
bad frame
bad /frame
#document
| <html>
|   a="b"
|   <head>
|     <template>
|       content
|   <body>

#data
<body><template><tr></tr><template></template><td></td></template>
#errors
no doctype
unexpected <td>
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <tr>
|         <template>
|           content
|         <tr>
|           <td>

#data
<body><template><thead></thead><template><tr></tr></template><tr></tr><tfoot></tfoot></template>
#errors
no doctype
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <thead>
|         <template>
|           content
|             <tr>
|         <tbody>
|           <tr>
|         <tfoot>

#data
<body><template><template><b><template></template></template>text</template>
#errors
no doctype
missing </b>
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <template>
|           content
|             <b>
|               <template>
|                 content
|         "text"

#data
<body><template><col><colgroup>
#errors
no doctype
bad colgroup
eof in template
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <col>

#data
<body><template><col></colgroup>
#errors
no doctype
bogus /colgroup
eof in template
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <col>

#data
<body><template><col><colgroup></template></body>
#errors
no doctype
bad colgroup
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <col>

#data
<body><template><col><div>
#errors
 * (1,7) missing DOCTYPE
 * (1,27) unexpected token
 * (1,27) unexpected end of file in template
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <col>

#data
<body><template><col></div>
#errors
no doctype
bad /div
eof in template
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <col>

#data
<body><template><col>Hello
#errors
no doctype
unexpected text
eof in template
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <col>

#data
<body><template><i><menu>Foo</i>
#errors
no doctype
mising /menu
eof in template
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <i>
|         <menu>
|           <i>
|             "Foo"

#data
<body><template></div><div>Foo</div><template></template><tr></tr>
#errors
no doctype
bogus /div
bogus tr
bogus /tr
eof in template
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content
|         <div>
|           "Foo"
|         <template>
|           content

#data
<body><div><template></div><tr><td>Foo</td></tr></template>
#errors
 * (1,7) missing DOCTYPE
 * (1,28) unexpected token in template
 * (1,60) unexpected end of file
#document
| <html>
|   <head>
|   <body>
|     <div>
|       <template>
|         content
|           <tr>
|             <td>
|               "Foo"

#data
<template></figcaption><sub><table></table>
#errors
no doctype
bad /figcaption
eof in template
#document
| <html>
|   <head>
|     <template>
|       content
|         <sub>
|           <table>
|   <body>

#data
<template><template>
#errors
no doctype
eof in template
eof in template
#document
| <html>
|   <head>
|     <template>
|       content
|         <template>
|           content
|   <body>

#data
<template><div>
#errors
no doctype
eof in template
#document
| <html>
|   <head>
|     <template>
|       content
|         <div>
|   <body>

#data
<template><template><div>
#errors
no doctype
eof in template
eof in template
#document
| <html>
|   <head>
|     <template>
|       content
|         <template>
|           content
|             <div>
|   <body>

#data
<template><template><table>
#errors
no doctype
eof in template
eof in template
#document
| <html>
|   <head>
|     <template>
|       content
|         <template>
|           content
|             <table>
|   <body>

#data
<template><template><tbody>
#errors
no doctype
eof in template
eof in template
#document
| <html>
|   <head>
|     <template>
|       content
|         <template>
|           content
|             <tbody>
|   <body>

#data
<template><template><tr>
#errors
no doctype
eof in template
eof in template
#document
| <html>
|   <head>
|     <template>
|       content
|         <template>
|           content
|             <tr>
|   <body>

#data
<template><template><td>
#errors
no doctype
eof in template
eof in template
#document
| <html>
|   <head>
|     <template>
|       content
|         <template>
|           content
|             <td>
|   <body>

#data
<template><template><caption>
#errors
no doctype
eof in template
eof in template
#document
| <html>
|   <head>
|     <template>
|       content
|         <template>
|           content
|             <caption>
|   <body>

#data
<template><template><colgroup>
#errors
no doctype
eof in template
eof in template
#document
| <html>
|   <head>
|     <template>
|       content
|         <template>
|           content
|             <colgroup>
|   <body>

#data
<template><template><col>
#errors
no doctype
eof in template
eof in template
#document
| <html>
|   <head>
|     <template>
|       content
|         <template>
|           content
|             <col>
|   <body>

#data
<template><template><tbody><select>
#errors
 * (1,11) missing DOCTYPE
 * (1,36) unexpected token in table - foster parenting
 * (1,36) unexpected end of file in template
 * (1,36) unexpected end of file in template
#document
| <html>
|   <head>
|     <template>
|       content
|         <template>
|           content
|             <tbody>
|             <select>
|   <body>

#data
<template><template><table>Foo
#errors
no doctype
foster-parenting text F
foster-parenting text o
foster-parenting text o
eof
eof
#document
| <html>
|   <head>
|     <template>
|       content
|         <template>
|           content
|             "Foo"
|             <table>
|   <body>

#data
<template><template><frame>
#errors
no doctype
bad tag
eof
eof
#document
| <html>
|   <head>
|     <template>
|       content
|         <template>
|           content
|   <body>

#data
<template><template><script>var i
#errors
no doctype
eof in script
eof in template
eof in template
#document
| <html>
|   <head>
|     <template>
|       content
|         <template>
|           content
|             <script>
|               "var i"
|   <body>

#data
<template><template><style>var i
#errors
no doctype
eof in style
eof in template
eof in template
#document
| <html>
|   <head>
|     <template>
|       content
|         <template>
|           content
|             <style>
|               "var i"
|   <body>

#data
<template><table></template><body><span>Foo
#errors
no doctype
missing /table
bad eof
#document
| <html>
|   <head>
|     <template>
|       content
|         <table>
|   <body>
|     <span>
|       "Foo"

#data
<template><td></template><body><span>Foo
#errors
no doctype
bad eof
#document
| <html>
|   <head>
|     <template>
|       content
|         <td>
|   <body>
|     <span>
|       "Foo"

#data
<template><object></template><body><span>Foo
#errors
no doctype
missing /object
bad eof
#document
| <html>
|   <head>
|     <template>
|       content
|         <object>
|   <body>
|     <span>
|       "Foo"

#data
<template><svg><template>
#errors
no doctype
eof in template
#document
| <html>
|   <head>
|     <template>
|       content
|         <svg svg>
|           <svg template>
|   <body>

#data
<template><svg><foo><template><foreignObject><div></template><div>
#errors
no doctype
ugly template closure
bad eof
#document
| <html>
|   <head>
|     <template>
|       content
|         <svg svg>
|           <svg foo>
|             <svg template>
|               <svg foreignObject>
|                 <div>
|   <body>
|     <div>

#data
<dummy><template><span></dummy>
#errors
no doctype
bad end tag </dummy>
eof in template
eof in dummy
#document
| <html>
|   <head>
|   <body>
|     <dummy>
|       <template>
|         content
|           <span>

#data
<body><table><tr><td><select><template>Foo</template><caption>A</table>
#errors
no doctype
(1,62): unexpected-caption-in-select-in-table
#document
| <html>
|   <head>
|   <body>
|     <table>
|       <tbody>
|         <tr>
|           <td>
|             <select>
|               <template>
|                 content
|                   "Foo"
|       <caption>
|         "A"

#data
<body></body><template>
#errors
no doctype
(1,23): template-after-body
(1,24): eof-in-template
#document
| <html>
|   <head>
|   <body>
|     <template>
|       content

#data
<head></head><template>
#errors
no doctype
(1,23): template-after-head
(1,24): eof-in-template
#document
| <html>
|   <head>
|     <template>
|       content
|   <body>

#data
<head></head><template>Foo</template>
#errors
no doctype
(1,23): template-after-head
#document
| <html>
|   <head>
|     <template>
|       content
|         "Foo"
|   <body>

#data
<!DOCTYPE HTML><dummy><table><template><table><template><table><script>
#errors
eof script
eof template
eof template
eof table
#document
| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <dummy>
|       <table>
|         <template>
|           content
|             <table>
|               <template>
|                 content
|                   <table>
|                     <script>

#data
<template><a><table><a>
#errors
#document
| <html>
|   <head>
|     <template>
|       content
|         <a>
|           <a>
|           <table>
|   <body>