this probably won't have any serious repercussions. Valid code is best, but almost all of the internet -many large, professional, and/or popular sites, including the page we're on- isn't "valid." And if it's *working*, your users will likely never notice a difference anyway. I'm not saying that you shouldn't aspire to write valid code -being new to html, that's awesome that you would choose to, and it will prove very beneficial- but don't blow a gasket over not having it. I know some people here are going to jump up and pound me into the ground for saying so
, but sometimes it doesn't cause any harm.
If you would like to keep your page "valid," you could try saving the javascript code into external files and just calling them from the page, instead of actually writing them on the page. I do this anyway, especially with longer scripts, just to keep my pages uncluttered. For example:
Code:
page.html
<html>
<head>
<script type="text/javascript" src="slideshow_head.js"></script>
</head>
<body>
<!--other content...-->
<script type="text/javascript" src="slideshow_body.js"></script>
<!--other content...-->
</body>
</html>
Code:
slideshow_head.js
/***********************************************
* Ultimate Fade-In Slideshow (v1.51): © Dynamic Drive (http://www.dynamicdrive.com)
//script code continues...
Code:
slideshow_body.js
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 140, 225, 0, 3000, 1, "R")
new fadeshow(fadeimages2, 140, 225, 0, 3000, 0)
Bookmarks