This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18687 - Mengapa Script Google Analytics muncul setelah tag penutup html?
Summary: Mengapa Script Google Analytics muncul setelah tag penutup html?
Status: RESOLVED NEEDSINFO
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL: www.widyokarsono.web.id
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-25 05:06 UTC by Yosef Benny Widyokarsono
Modified: 2012-10-03 08:11 UTC (History)
1 user (show)

See Also:


Attachments

Description Yosef Benny Widyokarsono 2012-08-25 05:06:40 UTC
<!doctype html>↩
<html>↩
<head><meta charset="utf-8"><title>Sumber Belajar</title></head>↩
<body><article><a href="//www.google-styleguide.googlecode.com" title="Google Styleguide">Google Styleguide</a>. <a href="//www.angularjs.org" title="AngularJS">AngularJS.org</a></article></body></html><script type="text/javascript">↩
↩
  var _gaq = _gaq || [];↩
  _gaq.push(['_setAccount', 'UA-29308303-1']);↩
  _gaq.push(['_trackPageview']);↩
↩
  (function() {↩
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;↩
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';↩
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);↩
  })();↩
↩
</script>

Namun saat saya coba mengubah validator inputnya menjadi html. Kode saya yang sebenarnya:
<!doctype html>↩
<html>↩
<head><meta charset="utf-8"><title>Sumber Belajar</title></head>↩
<body><article><a href="//www.google-styleguide.googlecode.com" title="Google Styleguide">Google Styleguide</a>. <a href="//www.angularjs.org" title="AngularJS">AngularJS.org</a></article></body></html>
dapat dicek dengan baik
Comment 1 Michael[tm] Smith 2012-10-03 08:11:53 UTC
I don't know what problem you're reporting here, but in the first code sample, you have this at the end :

</body></html><script>..

You need to move the script tag up into the body.