hi<!DocType "some stuff>">hi
hi<!DocTypE 'more stuff>'>hi
hi<!dOCtYPE>hi
hi<!dOcTyPeStuff>hi
hi<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">hi
hi<!doctype 'stuff'>hi

hi<!--comment-->hi
hi<!--<tag>-->hi
hi<!--false close>-->hi
hi<! --comment-- >hi
hi<!--comment-- --comment2-->hi

<!--Some-Formatted Text Examples-->
hi<pre>This is pre-formatted.</pre>hi
hi<PrE><tag></tag></PRe>hi
hi<PRE></></p></pR></pRee></pretag></Pre>hi
hi<pre><!--  -->"stuff"'hello'//*=
//!@#$><%^&*(){}~|\"-</pRe>hi
hi<pre><<<<</pre>hi
hi<pre></p</p</pre>hi
hi<pre><<</p<<</pre>hi
hi<pre><</pr<</ PR</Pre </pre>hi
hi<pre><</pre<</ pre </pre>hi
hi<pre></pre>hi
hi<pre><</pre>hi
hi<pre></pre>hi
hi<pre align=left some></pre>hi

<!--Some Client Side Scripting Examples-->
hi<script>This is a script</script>hi
hi<sCript><tag></tag></scriPt>hi
hi<SCRIPT></></s></SC></sCr></ScRi></SCRIP>
</scripttag></SCRIPTTAG></scRIpttag></Script>hi
hi<sCRIPT><!--  -->"stuff"'hello'//*=
//!@#$><%^&*(){}~|\"-</sCrIpT>hi
hi<sCRIPT><!-- </script> --></sCrIpT>hi
hi<scripT><<<<</scriPt>hi
hi<scripT></s</s</scriPt>hi
hi<scripT><<</s<<</scriPt>hi
hi<scripT><</scrI<</ SCR</ScRIpt </scriPt>hi
hi<scripT><</scrI<</ SCR </scriPt>hi
hi<scripT></SCRIPT</SCR</Sc</scriPt>hi
hi<scripT></scriPt>hi
hi<scripT><</SCriPt>hi
hi<scripT></SCriPt>hi

<!--Some Server Side Scripting Examples-->
hi<? echo ("this is the simplest, an SGML processing instruction\n"); ?>hi
hi<?php echo("if you want to serve XML documents, do like this\n"); ?>hi
hi<script language="php"> hi
	echo ("some editors (like FrontPage)
	don't like processing instructions");
</script>hi
hi<% echo ("ASP-style tags"); %>hi
hi<%= $variable; # This is a shortcut for "<%echo .." %>hi
hi<? echo ("hello"); ??>hi
hi<? echo ("hello"); ???>hi
hi<??>hi
hi<?>?>hi
hi<???>hi
hi<????>hi
hi<% echo ("hello"); %%>hi
hi<% echo ("hello"); %%%>hi
hi<%%>hi
hi<%>%>hi
hi<%%%>hi
hi<%%%%>hi

hi<tag>hi
hi<my.tag-your.tag>hi
hi<tag name>hi
hi<tag 2name>hi
hi<tag .name>hi
hi<tag -name>hi
hi<tag name=value>hi
hi<tag name=3value>hi
hi<tag name=.value>hi
hi<tag name=-value>hi
hi<tag name1=value1 name2=value2>hi
hi<tag name1=value1 name2 name3=value3 name4>hi
hi<tag name1 = value1 name2 name3 = value3 >hi
hi<tag name='value'>hi
hi<tag name="value">hi
hi<tag name=">">hi
hi<tag name='>'>hi

hi</end>hi
hi</ end >hi

hi&nbsp;hi&lt;hi&#23345;hi&#xf2;hi&#XFa33;hi&quot<tag>hi&amp 
hi&pi&nu&mu

The following may be represented as error:
hi&unknown;hi&NBSP;hi&LT;hi

Everything else definitly has errors:
hi<!--comment1-- notComment --comment2-->hi
hi<!not legal>hi
hi<!-not legal>hi
hi<!- not legal>hi
hi<! -not legal>hi
hi<!dnot legal>hi
hi<!Donot legal>hi
hi<!DoCnot legal>hi
hi<!DoCtypnot legal>hi
hi< tag>hi
hi<1tag>hi
hi<.tag>hi
hi<-tag>hi
hi<$tag>hi
hi<tag_>hi
hi<ta#g>hi
hi<tag *name>hi
hi<tag n<ame>hi
hi<tag name|>hi
hi<tag name=""">hi
hi<tag name='''>hi
hi<tag name=%value>hi
hi<tag name=val&ue>hi
hi<tag name=value)>hi
hi<script language=>this<that</script>hi
hi</>hi
hi</=end>hi
hi</en;d>hi
hi</end:>hi
hi</end end>hi
hi<tag name=>hi

<open