{"id":55294,"date":"2022-04-02T03:01:53","date_gmt":"2022-04-01T17:01:53","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=55294"},"modified":"2022-04-02T10:42:30","modified_gmt":"2022-04-02T00:42:30","slug":"html-online-validation-tidy-errors-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/html-online-validation-tidy-errors-tutorial\/","title":{"rendered":"HTML Online Validation Tidy Errors Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"HTML Online Validation Tidy Errors Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_error_output.jpg\" title=\"HTML Online Validation Tidy Errors Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">HTML Online Validation Tidy Errors Tutorial<\/p><\/div>\n<p>Recently the DOMDocument integrations into our (originally just PHP &#8220;tidy&#8221;) Online HTML Validator web application of <a title='HTML Online Validation Above the Fold Tutorial' href='#htmlovaft'>HTML Online Validation Above the Fold Tutorial<\/a> had taken precedence, but today it is time to improve on the &#8220;tidy&#8221; functionality, by fleshing out those &#8230;<\/p>\n<ul>\n<li>error count<\/li>\n<li>warning count<\/li>\n<\/ul>\n<p> &#8230; with some detail, obtained <font color=blue>via<\/font> &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n    $tidy = tidy_parse_string($htmlin);<br \/>\n    <font color=blue>$preteb=<a target=_blank title='PHP tidy_get_error_buffer() information' href='https:\/\/www.php.net\/manual\/en\/tidy.props.errorbuffer.php'>tidy_get_error_buffer<\/a>($tidy);<\/font><br \/>\n    $teb = '&lt;div title=\"Tidy errors and warnings ... ' . \"\\r\" . str_replace('\"','`',$preteb) . '\" style=font-size:8px;background-color:#e0e0e0;&gt;' . str_replace(\"line \",\"&lt;br&gt;line \", str_replace('&gt;','&amp;gt;',str_replace('&lt;','&amp;lt;',$preteb))) . '&lt;\/div&gt;';<br \/>\n    $tidy-&gt;cleanRepair();<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; also adding in DOMDocument findings, and rearrange the outputs into a &#8220;same flatness&#8221; table to try to keep &#8220;above the fold&#8221; on this MacBook Air with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php-----GETME\" title=\"tidy_example.php\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php-----GETME\" title=\"tidy_example.php\">tidy_example.php<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php\" title=\"Click picture\">proof of concept PHP online HTML validator web application<\/a> you can try <a href='#myifdd' title='Iframe usage'>here also<\/a>, the mobile platform versions of which only allow the DOMDocument methodology be used.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/html-online-validation-tidy-errors-tutorial\/'>HTML Online Validation Tidy Errors Tutorial<\/a>.<\/p-->\n<hr>\n<p id='htmlovaft'>Previous relevant <a target=_blank title='HTML Online Validation Above the Fold Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/html-online-validation-above-the-fold-tutorial\/'>HTML Online Validation Above the Fold Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"HTML Online Validation Above the Fold Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example_atf.jpg\" title=\"HTML Online Validation Above the Fold Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">HTML Online Validation Above the Fold Tutorial<\/p><\/div>\n<p>The &#8220;above the fold&#8221; reference in today&#8217;s blog posting title harkens back to the part of the (what was initially a newspaper, but more often these days a screen) content immediately viewable by the reader without any other action from them to renew that content in any way.   Yes, it is relative, and today we try to turn our Online HTML Validator web application to be more often &#8220;above the fold&#8221; using this MacBook Air screen, but the exercise of trying to do this will normally improve web application usability for other platforms as well.<\/p>\n<p>In order to help here, we &#8220;flattened&#8221; (horizontally) the HTML form table down the bottom of the screen, that also helps clarify that difference between &#8230;<\/p>\n<ul>\n<li>tidy &#8230; or &#8230;<\/li>\n<li>DOMDocument<\/li>\n<\/ul>\n<p> &#8230; PHP validation methodologies.<\/p>\n<p>Also, today, on top of yesterday&#8217;s <a title='HTML Online Validation via Error Array Tutorial' href='#htmloveat'>HTML Online Validation via Error Array Tutorial<\/a>&#8216;s progress we allow any one DOMDocument error line contains multiple error columns, as applicable, both being flagged in the user inputted HTML element presented, <font color=blue>as well<\/font> &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n<font color=blue>$qs=['&amp;#10067;', '&amp;#10071;', '&amp;#10133;', '&amp;#10060;'];<br \/>\n$iqs=0;<br \/>\n<br \/>\n  $errarr=[];<br \/>\n  $errline=[];<br \/>\n  $lastline=-1;<\/font><br \/>\n  foreach (libxml_get_errors() as $error) { \/\/ thanks to https:\/\/www.php.net\/manual\/en\/function.libxml-get-errors.php<br \/>\n   <font color=blue>if ($error-&gt;line != $lastline) {<br \/>\n     $iqs=0;<br \/>\n     if (sizeof($errline) != 0) {<br \/>\n      $lastone=$errarr[-1 + sizeof($errarr)];<br \/>\n      for ($jj=(-1 + sizeof($errline)); $jj&gt;=0; $jj--) {<br \/>\n        $errarr[-1 + sizeof($errarr)]=$errline[$jj];<br \/>\n      }<br \/>\n      $errarr[sizeof($errarr)]=$lastone;<br \/>\n      $errline=[];<br \/>\n     }<br \/>\n     $errarr[sizeof($errarr)]=$error;<br \/>\n     $lastline=$error-&gt;line;<br \/>\n   } else {<br \/>\n     $iqs++;<br \/>\n     $errline[sizeof($errline)]=$error;<br \/>\n   }<\/font><br \/>\n   if ($emore == '') { $emore.='&lt;br&gt;&lt;br&gt;&lt;table border=2 cellpadding=5 cellspacing=5 style=background-color:#ffffe0;&gt;&lt;tr&gt;&lt;td&gt;' . $within . '&lt;\/td&gt;&lt;td&gt;'; }<br \/>\n    switch ($error-&gt;level) {<br \/>\n        case LIBXML_ERR_WARNING:<br \/>\n            $emore .= \"DOMDocument::loadHTML(); Warning $error-&gt;code: \";<br \/>\n            break;<br \/>\n         case LIBXML_ERR_ERROR:<br \/>\n            $emore .= \"DOMDocument::loadHTML(); Error $error-&gt;code: \";<br \/>\n            break;<br \/>\n        case LIBXML_ERR_FATAL:<br \/>\n            $emore .= \"DOMDocument::loadHTML(); Fatal Error $error-&gt;code: \";<br \/>\n            break;<br \/>\n   }<br \/>\n   $emore.=$error-&gt;message . ' at line ' . $error-&gt;line . '  &lt;SUB&gt;' . $error-&gt;line . '&lt;\/SUB&gt;, column ' . $error-&gt;column . ' &lt;SUP&gt;<font color=blue>' . $qs[($iqs % sizeof($qs))] . '<\/font>&lt;\/SUP&gt;&lt;br&gt;';<br \/>\n  <font color=blue>}<br \/>\n<br \/> <br \/>\n  if (sizeof($errline) != 0) {<br \/>\n      $lastone=$errarr[sizeof($errarr)];<br \/>\n      for ($jj=(-1 + sizeof($errline)); $ii&gt;=0; $ii--) {<br \/>\n        $errarr[sizeof($errarr)]=$errline[$jj];<br \/>\n      }<br \/>\n      $errarr[sizeof($errarr)]=$lastone;<br \/>\n      $errline=[];<br \/>\n  }<br \/>\n<br \/> <br \/>\n  $iqs=0;<br \/>\n<br \/> <br \/>\n  for ($ii=0; $ii&lt;sizeof($errarr); $ii++) {<br \/>\n    $error=$errarr[$ii];<\/font><br \/>\n    \/\/ handle errors here<br \/>\n    if ($error-&gt;column == 0) {<br \/>\n      $betterbws[-1 + $error-&gt;line]='&lt;SUB&gt;' . $error-&gt;line . '&lt;\/SUB&gt;&lt;SUP&gt;<font color=blue>' . $qs[($iqs % sizeof($qs))] . '<\/font>&lt;\/SUP&gt;' . $betterbws[-1 + $error-&gt;line];<br \/>\n    } else {<br \/>\n      $betterbws[-1 + $error-&gt;line]=substr($betterbws[-1 + $error-&gt;line],0,<font color=blue>(-1 + <\/font>$error-&gt;column<font color=blue>)<\/font>) . '&lt;SUB&gt;' . $error-&gt;line . '&lt;\/SUB&gt;&lt;SUP&gt;<font color=blue>' . $qs[($iqs % sizeof($qs))] . '<\/font>&lt;\/SUP&gt;' . substr($betterbws[-1 + $error-&gt;line],<font color=blue>(-1 + <\/font>$error-&gt;column<font color=blue>)<\/font>);<br \/>\n    }<br \/>\n    <font color=blue>if (($ii + 1) == sizeof($errarr)) {<br \/>\n    $iqs=0;<\/font><br \/>\n    $betterwithin=str_replace($bws[-1 + $error-&gt;line], $betterbws[-1 + $error-&gt;line], $betterwithin);<br \/>\n    <font color=blue>} else if ($errarr[$ii + 1]-&gt;line != $errarr[$ii]-&gt;line) {<br \/>\n    $iqs=0;<br \/>\n    $betterwithin=str_replace($bws[-1 + $error-&gt;line], $betterbws[-1 + $error-&gt;line], $betterwithin);<br \/>\n    } else {<br \/>\n    $iqs++;<br \/>\n    }<\/font><br \/>\n  }<br \/>\n  libxml_clear_errors();<br \/>\n  if ($emore != '') {<br \/>\n    $emore=str_replace($within, str_replace('&lt;\/SUP&gt;','&lt;\/sup&gt;',str_replace('&lt;SUP&gt;','&lt;sup&gt;',str_replace('&lt;\/SUB&gt;','&lt;\/sub&gt;',str_replace('&lt;SUB&gt;','&lt;sub&gt;',str_replace('&lt;BR&gt;','&lt;br&gt;',str_replace('&gt;','&gt;',str_replace('&lt;','&lt;',$betterwithin))))))), $emore) . '&lt;\/td&gt;&lt;\/tr&gt;&lt;\/table&gt;&lt;br&gt;';<br \/>\n  }<br \/>\n  $tec='No tidy module detected.' . $emore;<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php----GETME\" title=\"tidy_example.php\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php----GETME\" title=\"tidy_example.php\">tidy_example.php<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php\" title=\"Click picture\">proof of concept PHP online HTML validator web application<\/a> you can try <a href='#myifdd' title='Iframe usage'>here also<\/a>, the mobile platform versions of which only allow the DOMDocument methodology be used.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/html-online-validation-above-the-fold-tutorial\/'>HTML Online Validation Above the Fold Tutorial<\/a>.<\/p-->\n<hr>\n<p id='htmloveat'>Previous relevant <a target=_blank title='HTML Online Validation via Error Array Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/html-online-validation-via-error-array-tutorial\/'>HTML Online Validation via Error Array Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"HTML Online Validation via Error Array Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example_errors.jpg\" title=\"HTML Online Validation via Error Array Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">HTML Online Validation via Error Array Tutorial<\/p><\/div>\n<p>Today&#8217;s job is to sharpen up the DOMDocument Online HTML Validation error reporting, onto yesterday&#8217;s <a title='HTML Online Validation via PHP Rendering Tutorial' href='#htmlovphprt'>HTML Online Validation via PHP Rendering Tutorial<\/a> by &#8230;<\/p>\n<ul>\n<li>organizing the error messages to appear in a right hand column of a two column table, rather than up the top before any HTML &#8230; and &#8230;<\/li>\n<li>via <font color=blue>new error processing code<\/font> &#8230;<br \/>\n&lt;?php<br \/>\n<code><br \/>\n  <font color=blue><a target=_blank title='PHP libxml_use_internal_errors function information' href='https:\/\/www.php.net\/manual\/en\/function.libxml-use-internal-errors.php'>libxml_use_internal_errors<\/a>(true);<\/font><br \/>\n  $doc = new DOMDocument();<br \/>\n  <font color=blue>$doc-&gt;validateOnParse = true;<\/font><br \/>\n  $doc-&gt;loadHTML($htmlin);<br \/>\n<br \/> <br \/>\n  <font color=blue>$betterwithin=str_replace(\"\\n\",\"  &lt;BR&gt;\",$htmlin);<br \/>\n  $within=str_replace(\"\\n\",\"  &lt;BR&gt;\",str_replace('&gt;','~',str_replace('&lt;','`',$htmlin)));<br \/>\n  $bws=explode(\"&lt;BR&gt;\", $betterwithin);<br \/>\n  $betterbws=explode(\"&lt;BR&gt;\", $betterwithin);<br \/>\n<br \/> <br \/>\n  foreach (libxml_get_errors() as $error) { \/\/ thanks to <a target=_blank title='https:\/\/www.php.net\/manual\/en\/function.libxml-get-errors.php' href='https:\/\/www.php.net\/manual\/en\/function.libxml-get-errors.php'>https:\/\/www.php.net\/manual\/en\/function.libxml-get-errors.php<\/a><br \/>\n    \/\/ handle errors here<br \/>\n    if ($emore == '') { $emore.='&lt;br&gt;&lt;br&gt;&lt;table border=2 cellpadding=5 cellspacing=5 style=background-color:#ffffe0;&gt;&lt;tr&gt;&lt;td&gt;' . $within . '&lt;\/td&gt;&lt;td&gt;'; }<br \/>\n    switch ($error-&gt;level) {<br \/>\n        case LIBXML_ERR_WARNING:<br \/>\n            $emore .= \"DOMDocument::loadHTML(); Warning $error-&gt;code: \";<br \/>\n            break;<br \/>\n         case LIBXML_ERR_ERROR:<br \/>\n            $emore .= \"DOMDocument::loadHTML(); Error $error-&gt;code: \";<br \/>\n            break;<br \/>\n        case LIBXML_ERR_FATAL:<br \/>\n            $emore .= \"DOMDocument::loadHTML(); Fatal Error $error-&gt;code: \";<br \/>\n            break;<br \/>\n    }<br \/>\n    $emore.=$error-&gt;message . ' at line ' . $error-&gt;line . '  &lt;SUB&gt;' . $error-&gt;line . '&lt;\/SUB&gt;, column ' . $error-&gt;column . ' &lt;SUP&gt;&amp;#10067;&lt;\/SUP&gt;&lt;br&gt;';<br \/>\n    if ($error-&gt;column == 0) {<br \/>\n      $betterbws[-1 + $error-&gt;line]='&lt;SUB&gt;' . $error-&gt;line . '&lt;\/SUB&gt;&lt;SUP&gt;&amp;#10067;&lt;\/SUP&gt;' . $betterbws[-1 + $error-&gt;line];<br \/>\n    } else {<br \/>\n      $betterbws[-1 + $error-&gt;line]=substr($betterbws[-1 + $error-&gt;line],0,$error-&gt;column) . '&lt;SUB&gt;' . $error-&gt;line . '&lt;\/SUB&gt;&lt;SUP&gt;&amp;#10067;&lt;\/SUP&gt;' . substr($betterbws[-1 + $error-&gt;line],$error-&gt;column);<br \/>\n    }<br \/>\n    $betterwithin=str_replace($bws[-1 + $error-&gt;line], $betterbws[-1 + $error-&gt;line], $betterwithin);<br \/>\n  }<br \/>\n  libxml_clear_errors();<br \/>\n  if ($emore != '') {<br \/>\n    $emore=str_replace($within, str_replace('&lt;\/SUP&gt;','&lt;\/sup&gt;',str_replace('&lt;SUP&gt;','&lt;sup&gt;',str_replace('&lt;\/SUB&gt;','&lt;\/sub&gt;',str_replace('&lt;SUB&gt;','&lt;sub&gt;',str_replace('&lt;BR&gt;','&lt;br&gt;',str_replace('&gt;','&gt;',str_replace('&lt;','&lt;',$betterwithin))))))), $emore) . '&lt;\/td&gt;&lt;\/tr&gt;&lt;\/table&gt;&lt;br&gt;';<br \/>\n  }<\/font><br \/>\n  $tec='No tidy module detected.'<font color=blue> . $emore<\/font>;<br \/>\n<\/code><br \/>\n?&gt;<br \/>\n &#8230; be able to add to the precision of the HTML validation linking that right hand column entries with left hand HTML content context via the use of &lt;sub&gt;[line number]&lt;\/sub&gt; and &lt;sup&gt;&amp;10067;&lt;\/sup&gt; (&#10067;) &#8220;linkers&#8221;\n<\/li>\n<\/ul>\n<p> &#8230; with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php---GETME\" title=\"tidy_example.php\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php---GETME\" title=\"tidy_example.php\">tidy_example.php<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php\" title=\"Click picture\">proof of concept PHP online HTML validator web application<\/a> you can try <a href='#myifdd' title='Iframe usage'>here also<\/a>, the mobile platform versions of which only allow the DOMDocument methodology be used.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/html-online-validation-via-error-array-tutorial\/'>HTML Online Validation via Error Array Tutorial<\/a>.<\/p-->\n<hr>\n<p id='htmlovphprt'>Previous relevant <a target=_blank title='HTML Online Validation via PHP Rendering Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/html-online-validation-via-php-rendering-tutorial\/'>HTML Online Validation via PHP Rendering Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"HTML Online Validation via PHP Rendering Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example_plus.jpg\" title=\"HTML Online Validation via PHP Rendering Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">HTML Online Validation via PHP Rendering Tutorial<\/p><\/div>\n<p>Onto yesterday&#8217;s <a title='HTML Online Validation via PHP DOMDocument Tutorial' href='#htmlovphpdomdt'>HTML Online Validation via PHP DOMDocument Tutorial<\/a>, today, we tackle numerous improvements and fixes to our Online HTML Validator (PHP) web application as per &#8230;<\/p>\n<ul>\n<li>add PHP <i>tidy<\/i> module parsing results in <font color=blue>HTML report<\/font> &#8230;<br \/>\n&lt;?php<br \/>\n<code><br \/>\n    $tec='' . tidy_error_count($tidy) . ' errors<font color=blue>&lt;br&gt;&lt;pre onclick=woit(this); id=tidyout title=\"PHP tidy parses HTML to look like below and click here to show web browser rendering\" style=background-color:pink;&gt;' . str_replace('&gt;','&gt;',str_replace('&lt;','&lt;',tidy_get_output($tidy))) . '&lt;\/pre&gt;<\/font>';<br \/>\n<\/code><br \/>\n?&gt;\n<\/li>\n<li>add onclick=woit(this); logic to HTML content elements to show how the web browser would <i>render<\/i> such HTML &#8230;<br \/>\n&lt;?php echo &#8221;<br \/>\n<code><br \/>\n  var wo=null;<br \/>\n  var ofc=false;<br \/>\n  var lasttitle=' ';<br \/>\n  var lastcont='';<br \/>\n<br \/> <br \/>\n  function woit(ine) {<br \/>\n    var asttitle='';<br \/>\n    var astcont='';<br \/>\n    var rectis=ine.getBoundingClientRect();<br \/>\n    if (wo) { wo.close(); wo=null; }<br \/>\n    if (('' + ine.type) == 'textarea' && ofc) {<br \/>\n      ofc=true;<br \/>\n    } else {<br \/>\n    if (('' + ine.outerHTML).indexOf('&lt;\/h4&gt;') != -1) {<br \/>\n      if (('' + ine.getAttribute('data-render')) != '') {<br \/>\n      var prefx='';<br \/>\n      var sufx='';<br \/>\n      if (('' + ine.getAttribute('data-render')).replace(\/\\&gt\\;\/g,'&gt;').replace(\/\\&lt\\;\/g,'&lt;').indexOf('&lt;\/body&gt;') == -1) {<br \/>\n      prefx='&lt;html&gt;&lt;body&gt;';<br \/>\n      sufx='&lt;\/body&gt;&lt;\/html&gt;';<br \/>\n      } else if (('' + ine.getAttribute('data-render')).replace(\/\\&gt\\;\/g,'&gt;').replace(\/\\&lt\\;\/g,'&lt;').indexOf('&lt;\/html&gt;') == -1) {<br \/>\n      prefx='&lt;html&gt;';<br \/>\n      sufx='&lt;\/html&gt;';<br \/>\n      }<br \/>\n      astcont=prefx + ('' + ine.getAttribute('data-render')).replace(\/\\&gt\\;\/g,'&gt;').replace(\/\\&lt\\;\/g,'&lt;').replace(\/\\&\\#10004\\;\\ \/g,'').replace(\/\\&\\#10060\\;\\ \/g,'') + sufx;<br \/>\n    if (navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<br \/>\n      wo=window.open('','_blank');<br \/>\n    } else {<br \/>\n      wo=window.open('','_blank','left=' + rectis.left + ',top=' + rectis.top + ',width=' + rectis.width + ',height=' + rectis.height);<br \/>\n    }<br \/>\n      wo.document.write(astcont);<br \/>\n      wo.document.title='PHP DOMDocument parsing passed onto web browser rendering';<br \/>\n      lastcont=astcont;<br \/>\n      } else if (ine.innerHTML.indexOf('&lt;br&gt;' + String.fromCharCode(10) + '&lt;br&gt;' + String.fromCharCode(10) + '&lt;br&gt;' + String.fromCharCode(10)) != -1) {<br \/>\n      astcont=ine.innerHTML.split('&lt;br&gt;' + String.fromCharCode(10) + '&lt;br&gt;' + String.fromCharCode(10) + '&lt;br&gt;' + String.fromCharCode(10))[1].replace(\/\\&gt\\;\/g,'&gt;').replace(\/\\&lt\\;\/g,'&lt;').replace(\/\\&\\#10004\\;\\ \/g,'').replace(\/\\&\\#10060\\;\\ \/g,'').replace(\/\\&\\#10067\\;\\ \/g,'');<br \/>\n      asttitle='PHP DOMDocument parsing passed onto web browser rendering';<br \/>\n      if (asttitle != lasttitle || astcont != lastcont) {<br \/>\n    if (navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<br \/>\n      wo=window.open('','_blank');<br \/>\n    } else {<br \/>\n      wo=window.open('','_blank','left=' + rectis.left + ',top=' + rectis.top + ',width=' + rectis.width + ',height=' + rectis.height);<br \/>\n    }<br \/>\n      wo.document.write(astcont);<br \/>\n      lastcont=astcont;<br \/>\n      }<br \/>\n      } else {<br \/>\n      astcont=ine.innerHTML.replace(\/\\&gt\\;\/g,'&gt;').replace(\/\\&lt\\;\/g,'&lt;').replace(\/\\&\\#10004\\;\\ \/g,'').replace(\/\\&\\#10060\\;\\ \/g,'').replace(\/\\&\\#10067\\;\\ \/g,'').replace(\/^\\ \\.\\.\\.\\ \/g,'');<br \/>\n      asttitle='PHP DOMDocument parsing passed onto web browser rendering';<br \/>\n      if (asttitle != lasttitle || astcont != lastcont) {<br \/>\n    if (navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<br \/>\n      wo=window.open('','_blank');<br \/>\n    } else {<br \/>\n      wo=window.open('','_blank','left=' + rectis.left + ',top=' + rectis.top + ',width=' + rectis.width + ',height=' + rectis.height);<br \/>\n    }<br \/>\n      wo.document.write(astcont);<br \/>\n      lastcont=astcont;<br \/>\n      }<br \/>\n      wo.document.title='PHP DOMDocument parsing passed onto web browser rendering';<br \/>\n      lasttitle='PHP DOMDocument parsing passed onto web browser rendering';<br \/>\n      }<br \/>\n    } else if (('' + ine.type) != 'textarea') {<br \/>\n      astcont=ine.outerHTML.split('&lt;\/pre&gt;')[0].split('&gt;')[1].replace(\/\\&gt\\;\/g,'&gt;').replace(\/\\&lt\\;\/g,'&lt;');<br \/>\n      asttitle='PHP tidy module parsing passed onto web browser rendering';<br \/>\n      if (asttitle != lasttitle || astcont != lastcont) {<br \/>\n    if (navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<br \/>\n      wo=window.open('','_blank');<br \/>\n    } else {<br \/>\n      wo=window.open('','_blank','left=' + rectis.left + ',top=' + rectis.top + ',width=' + rectis.width + ',height=' + rectis.height);<br \/>\n    }<br \/>\n      wo.document.write(astcont);<br \/>\n      lastcont=astcont;<br \/>\n      wo.document.title='PHP tidy module parsing passed onto web browser rendering';<br \/>\n      lasttitle='PHP tidy module parsing passed onto web browser rendering';<br \/>\n      }<br \/>\n    } else {<br \/>\n      astcont=ine.value;<br \/>\n      if (document.URL.indexOf('localhost') != -1) {<br \/>\n      asttitle='Your proposed HTML passed onto web browser rendering';<br \/>\n      } else {<br \/>\n      asttitle='Your proposed HTML passed onto web browser rendering';<br \/>\n      }<br \/>\n      if (asttitle != lasttitle || astcont != lastcont) {<br \/>\n    if (navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<br \/>\n      wo=window.open('','_blank');<br \/>\n    } else {<br \/>\n      wo=window.open('','_blank','left=' + rectis.left + ',top=' + rectis.top + ',width=' + rectis.width + ',height=' + rectis.height);<br \/>\n    }<br \/>\n      wo.document.write(astcont);<br \/>\n      lastcont=astcont;<br \/>\n      if (document.URL.indexOf('localhost') != -1) {<br \/>\n      wo.document.title='Your proposed HTML passed onto web browser rendering';<br \/>\n      lasttitle='Your proposed HTML passed onto web browser rendering';<br \/>\n      } else {<br \/>\n      wo.document.title='Your proposed HTML passed onto web browser rendering';<br \/>\n      lasttitle='Your proposed HTML passed onto web browser rendering';<br \/>\n      }<br \/>\n      }<br \/>\n    }<br \/>\n    }<br \/>\n  }<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;\n<\/li>\n<li>deal with user HTML that contains the <i>+<\/i> character (which PHP uses for space encoding, as distinct from Javascript encodeURIComponent&#8217;s use of %20 for space encoding) via new <i>form<\/i> <i>onsubmit=&#8217;return butplus(this);&#8217;<\/i> logic as per &#8230;<br \/>\n&lt;?php echo &#8221;<br \/>\n<code><br \/>\n  function butplus(thisf) {<br \/>\n    var idof=thisf.innerHTML.split(' id=\\\"')[1].split('\\\"')[0];<br \/>\n    if (document.getElementById(idof).value.indexOf('+') != -1) {<br \/>\n      if (('' + thisf.method).toLowerCase() == 'get') {<br \/>\n        location.href=thisf.action + '?' + idof + '=' + encodeURIComponent(document.getElementById(idof).value);<br \/>\n        return false;<br \/>\n      } else if (encodeURIComponent(document.getElementById(idof).value).length &lt;= 800) {<br \/>\n        thisf.method='GET';<br \/>\n        location.href=thisf.action + '?' + idof + '=' + encodeURIComponent(document.getElementById(idof).value);<br \/>\n        return false;<br \/>\n      } else {<br \/>\n        document.getElementById(idof).value=document.getElementById(idof).value.replace(\/\\+\/g,encodeURIComponent('+'));<br \/>\n      }<br \/>\n    }<br \/>\n    return true;<br \/>\n  }<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;\n<\/li>\n<li>add a &#10067; ( <font color=blue>&amp;#10067;<\/font> ) status to DOMDocument parsing logic where the current interim okayed element&#8217;s outerHTML is contained wholly in the previous erroneous parent element &#8230;<br \/>\n&lt;?php<br \/>\n<code><br \/>\nfunction nodeContent($n, $outer=false) { \/\/ thanks to https:\/\/stackoverflow.com\/questions\/5404941\/how-to-return-outer-html-of-domdocument<br \/>\n    global $ioff, $origh<font color=blue>, $lasth<\/font>;<br \/>\n    $d = new DOMDocument();<br \/>\n    $b = $d-&gt;importNode($n-&gt;cloneNode(true),true);<br \/>\n    $d-&gt;appendChild($b);<br \/>\n    $h = $d-&gt;saveHTML();<br \/>\n    \/\/ remove outter tags<br \/>\n    if (!$outer) {<br \/>\n     $h = substr($h,strpos($h,'&gt;')+1,-(strlen($n-&gt;nodeName)+4));<br \/>\n    } else {<br \/>\n     if ($ioff == -2 && strpos(strtolower($h), '&lt;html') !== false) {  return '';   }<br \/>\n     if ($ioff &lt;= -1 && strpos(strtolower($h), '&lt;body') !== false) {  return '';   }<br \/>\n    }<br \/>\n    if (stripos( str_replace('&nbsp;','',str_replace(' ','',str_replace(\"\\n\",'',str_replace(\"\\r\",'',str_replace(\"\\r\\n\",'',str_replace(\"'\",'',str_replace('\"','',$origh))))))),str_replace('&nbsp;','',str_replace(' ','',str_replace(\"\\n\",'',str_replace(\"\\r\",'',str_replace(\"\\r\\n\",'',str_replace(\"'\",'',str_replace('\"','',('' . $h))))))))  ) !== false) {<br \/>\n      <font color=blue>if (strpos(str_replace('&gt;','&gt;',str_replace('&lt;','&lt;',str_replace('&nbsp;','',str_replace(' ','',str_replace(\"\\n\",'',str_replace(\"\\r\",'',str_replace(\"\\r\\n\",'',str_replace(\"'\",'',str_replace('\"','',('' . $lasth)))))))))), str_replace('&gt;','&gt;',str_replace('&lt;','&lt;',str_replace('&nbsp;','',str_replace(' ','',str_replace(\"\\n\",'',str_replace(\"\\r\",'',str_replace(\"\\r\\n\",'',str_replace(\"'\",'',str_replace('\"','',('' . $h))))))))))) !== false) {<br \/>\n        return '&amp;#10067; ' . $h;<br \/>\n      }<br \/>\n      $lasth=\"\";<br \/>\n      return '&amp;#10004; ' . $h;<\/font><br \/>\n    } else if (1 == 1) {<br \/>\n      <font color=blue>if (stripos($h, '&lt;\/body&gt;') === false) {<br \/>\n      $lasth='&amp;#10060; ' . $h;<br \/>\n      return $lasth;<br \/>\n      } else {<br \/>\n      $lasth=\"\";<br \/>\n      return '&amp;#10060; ' . $h;<br \/>\n      }<\/font><br \/>\n    }<br \/>\n    return '' . $h;<br \/>\n}<br \/>\n<\/code><br \/>\n?&gt;\n<\/li>\n<li>add <font color=blue>more characters<\/font> to ignore with the <i>whitespace if<\/i> checking codeline &#8230;<br \/>\n&lt;?php<br \/>\n<code><br \/>\n    if (stripos( str_replace('&nbsp;','',str_replace(' ','',<font color=blue>str_replace(\"\\n\",'',str_replace(\"\\r\",'',str_replace(\"\\r\\n\",'',str_replace(\"'\",'',<\/font>str_replace('\"','',$origh)<font color=blue>))))<\/font>)),str_replace('&nbsp;','',str_replace(' ','',str_replace(\"\\n\",'',<font color=blue>str_replace(\"\\r\",'',str_replace(\"\\r\\n\",'',str_replace(\"'\",'',<\/font>str_replace('\"','',('' . $h))<font color=blue>)))<\/font>)))  ) !== false) {<br \/>\n      \/\/ here if parsed outerHTML matches input outerHTML<br \/>\n    } else {<br \/>\n      \/\/ here if parsed outerHTML does not match input outerHTML<br \/>\n    }<br \/>\n<\/code><br \/>\n?&gt;\n<\/li>\n<li>do some CSS styling with the input type=submit buttons &#8230;<br \/>\n&lt;?php echo &#8221;<br \/>\n<code><br \/>\n&lt;style&gt; input[type=submit] {  width:40%; height:50px; border-radius:30px;  } &lt;\/style&gt;<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;\n<\/li>\n<\/ul>\n<p>Again, <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php--GETME\" title=\"tidy_example.php\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php--GETME\" title=\"tidy_example.php\">tidy_example.php<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php\" title=\"Click picture\">proof of concept PHP online HTML validator web application<\/a> you can try <a href='#myifdd' title='Iframe usage'>here also<\/a>, the mobile platform versions of which only allow the DOMDocument methodology be used.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/html-online-validation-via-php-rendering-tutorial\/'>HTML Online Validation via PHP Rendering Tutorial<\/a>.<\/p-->\n<hr>\n<p id='htmlovphpdomdt'>Previous relevant <a target=_blank title='HTML Online Validation via PHP DOMDocument Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/html-online-validation-via-php-domdocument-tutorial\/'>HTML Online Validation via PHP DOMDocument Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"HTML Online Validation via PHP DOMDocument Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example_dd.jpg\" title=\"HTML Online Validation via PHP DOMDocument Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">HTML Online Validation via PHP DOMDocument Tutorial<\/p><\/div>\n<p>The lack of platform functionality that yesterday&#8217;s <a title='HTML Online Validation via PHP Tidy Primer Tutorial' href='#htmlovphptpt'>HTML Online Validation via PHP Tidy Primer Tutorial<\/a> &#8220;Intranet feeling&#8221; <i>Online HTML Validator<\/i> web application was supported by, got us interested in exploring HTML validation via PHP <a target=_blank title=DOMDocument href='https:\/\/www.php.net\/manual\/en\/book.dom.php'>DOMDocument<\/a> methodologies.<\/p>\n<p>Yes, (serverside) PHP can work with (its version of) DOM (document object model) but not as well as (clientside) Javascript DOM can.  The validation of HTML at the serverside (PHP) stage does not take into account web page rendering, and so struggles to detect &#8220;well formed looking&#8221; HTML (but) with HTML tags that mean nothing.  But we can do some validation checking via &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\nfunction nodeContent($n, $outer=false) { \/\/ thanks to <a target=_blank title='https:\/\/stackoverflow.com\/questions\/5404941\/how-to-return-outer-html-of-domdocument' href='https:\/\/stackoverflow.com\/questions\/5404941\/how-to-return-outer-html-of-domdocument'>https:\/\/stackoverflow.com\/questions\/5404941\/how-to-return-outer-html-of-domdocument<\/a><br \/>\n    global $ioff, $origh;<br \/>\n    $d = new DOMDocument();<br \/>\n    $b = $d-&gt;importNode($n-&gt;cloneNode(true),true);<br \/>\n    $d-&gt;appendChild($b);<br \/>\n    $h = $d-&gt;saveHTML();<br \/>\n    \/\/ remove outter tags<br \/>\n    if (!$outer) {<br \/>\n     $h = substr($h,strpos($h,'&gt;')+1,-(strlen($n-&gt;nodeName)+4));<br \/>\n    } else {<br \/>\n     if ($ioff == -2 && strpos(strtolower($h), '&lt;html') !== false) {  return '';   }<br \/>\n     if ($ioff &lt;= -1 && strpos(strtolower($h), '&lt;body') !== false) {  return '';   }<br \/>\n    }<br \/>\n    if (stripos( str_replace(' ','',str_replace('\"','',$origh)),str_replace(' ','',str_replace(\"\\n\",'',str_replace('\"','',('' . $h))))  ) !== false) {<br \/>\n      return '&amp;#10004; ' . $h;<br \/>\n    } else if (1 == 1) {<br \/>\n      return '&amp;#10060; ' . $h;<br \/>\n    }<br \/>\n    return '' . $h;<br \/>\n}<br \/>\n<br \/>\n  $doc = new DOMDocument();<br \/>\n  $doc-&gt;loadHTML($htmlin);<br \/>\n  foreach ($doc-&gt;getElementsByTagName(\"*\") as $item) {<br \/>\n    $elecnt++;<br \/>\n    if ($rest == \"\") { $rest = \" ... \"; }<br \/>\n    $rest.=' &lt;br&gt;' . str_replace('&gt;','&gt;',str_replace('&lt;','&lt;',nodeContent($item, true)));<br \/>\n  }<br \/>\n  $twc='Number of elements detected is ' . ($ioff + $elecnt) . $rest;<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php-GETME\" title=\"tidy_example.php\">The changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php-GETME\" title=\"tidy_example.php\">tidy_example.php<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php\" title=\"Click picture\">proof of concept PHP online HTML validator web application<\/a> you can try <a href='#myifdd' title='Iframe usage'>here also<\/a>, the mobile platform versions of which only allow the DOMDocument methodology be used.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/html-online-validation-via-php-docdocument-tutorial\/'>HTML Online Validation via PHP DOMDocument Tutorial<\/a>.<\/p-->\n<hr>\n<p id='htmlovphptpt'>Previous relevant <a target=_blank title='HTML Online Validation via PHP Tidy Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/html-online-validation-via-php-tidy-primer-tutorial\/'>HTML Online Validation via PHP Tidy Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"HTML Online Validation via PHP Tidy Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.jpg\" title=\"HTML Online Validation via PHP Tidy Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">HTML Online Validation via PHP Tidy Primer Tutorial<\/p><\/div>\n<p>In terms of your, perhaps <a target=_blank title='MAMP local Apache\/PHP\/MySql web server' href='http:\/\/mamp.info'>MAMP<\/a>, Apache\/PHP\/MySql local web server&#8217;s &#8220;low hanging fruit&#8221; for extending PHP functionality, what are the most straightforward PHP modules to look at?  We&#8217;d say &#8230;<\/p>\n<ol>\n<li>find your Apache\/PHP\/MySql local web server&#8217;s php.ini (or equivalent) &#8230;<\/li>\n<li>(text) edit this php.ini &#8230;<\/li>\n<li>find &#8220;extension=&#8221; section and see those that are commented out &#8230;<\/li>\n<li>these PHP modules will have been installed but held back from being activated &#8230;<\/li>\n<li>you can then uncomment these &#8230; <\/li>\n<li>File -&gt; Save the new version of php.ini &#8230; then &#8230;<\/li>\n<li>stop and start your Apache\/PHP\/MySql local web server<\/li>\n<\/ol>\n<p> &#8230; and we found on our macOS Apache\/PHP\/MySql local web server the chance to introduce into our thinking, the use of the PHP module called <a target=_blank title='PHP tidy module' href='https:\/\/www.php.net\/manual\/en\/book.tidy.php'>&#8220;tidy&#8221;<\/a>.  Doing the research and development on this lead us to believe we could develop an &#8220;online HTML validator&#8221; (for small amounts of HTML on the RJM Programming domain version, initially), with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php_GETME\" title=\"tidy_example.php\">tidy_example.php<\/a> (which we&#8217;d want you to download to the <a target=_blank title='Apache document root' href='https:\/\/www.google.com\/search?q=document+root+apache&#038;rlz=1C5CHFA_enAU973AU973&#038;oq=document+root+apache&#038;aqs=chrome..69i57j0i512l3j0i22i30l6.4801j0j4&#038;sourceid=chrome&#038;ie=UTF-8'>document root<\/a> folder of your, perhaps MAMP, Apache\/PHP\/MySql local web server, to enable our &#8220;Intranet&#8221; feeling modus operandi up at the RJM Programming public domain) <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php\" title=\"Click picture\">proof of concept PHP online HTML validator web application<\/a> &#8230;<\/p>\n<p><iframe id=myifdd src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tidy_example.php\" style=\"width:100%;height:1600px;\"><\/iframe><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55244' onclick='var dv=document.getElementById(\"d55244\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/module\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55244' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55256' onclick='var dv=document.getElementById(\"d55256\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/dom\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55256' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55262' onclick='var dv=document.getElementById(\"d55262\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/rendering\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55262' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55271' onclick='var dv=document.getElementById(\"d55271\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/error\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55271' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55278' onclick='var dv=document.getElementById(\"d55278\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/fold\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55278' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55294' onclick='var dv=document.getElementById(\"d55294\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/warning\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55294' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Recently the DOMDocument integrations into our (originally just PHP &#8220;tidy&#8221;) Online HTML Validator web application of HTML Online Validation Above the Fold Tutorial had taken precedence, but today it is time to improve on the &#8220;tidy&#8221; functionality, by fleshing out &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/html-online-validation-tidy-errors-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,37],"tags":[51,85,103,2105,1750,354,356,360,1605,1929,394,576,744,802,861,932,997,1049,3625,1917,1107,3754,3753,1238,1262,3945,1319,1357,1358,3946],"class_list":["post-55294","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-above-the-fold","tag-apache","tag-array","tag-context","tag-document-root","tag-dom","tag-domdocument","tag-download","tag-encodeuricomponent","tag-error","tag-error-log","tag-html","tag-mamp","tag-module","tag-onclick","tag-php","tag-programming","tag-render","tag-rendering","tag-scroll","tag-scrolling","tag-sub","tag-sup","tag-table","tag-textarea","tag-tidy","tag-tutorial","tag-validate","tag-validation","tag-warning"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55294"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=55294"}],"version-history":[{"count":5,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55294\/revisions"}],"predecessor-version":[{"id":55305,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55294\/revisions\/55305"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=55294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=55294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=55294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}