1) you can't put a paragraph inside a paragraph, that's invalid markup.
2) depending on your doctype, you can't put italics around a paragraph as that's a inline-level element. HTML 5-tards say it's ok, but it's still buggy as sin and completely pointless in this case.
3) no quotes on complex attribute values is going to be broken.
4) it's accessibility trash to declare fonts in pixels... and 72px? REALLY?!?
5) If those are quotes, it should be a BLOCKQUOTE, not a DIV... probably with a CITE inside it too.
6) You may want to learn what semantic markup is.
7) GET your CSS out of the markup... and out of the scripting too.
8) You don't need that extra wrapping function on the timeout
9) Might be nice to double check the new quote isn't the existing one.
10) I'd move that script to right before </body> so you don't have to wait for onload.
11) That's a sloppy onload method that shouldn't work in the first place.
Try this on for size:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
lang="en"
xml:lang="en"
<head>
<meta
http-equiv="Content-Type"
content="text/html; charset=utf-8"
/>
<meta
http-equiv="Content-Language"
content="en"
/>
<style type="text/css">
#showText {
font:italic 72px/80px arial,helvetica,sans-serif;
}
</style>
<title>
Random Text
</title>
</head><body>
<blockquote id="showText"></blockquote>
<script type="text/javascript"><!--
(function() {
var
quotes = [
'<p>"Bunch of Words" - <cite>Quote Author</cite></p>',
'<p>"Quote Number Two" - <cite>Second Quote Author</cite></p>'
],
showText = document.getElementById('showText'),
current = quotes.length,
next;
function randomQuote() {
do {
next = Math.floor(Math.random() * quotes.length);
} while (next == current);
showText.innerHTML = quotes[current = next];
}
randomQuote();
setInterval(randomQuote, 10000);
})();
--></script>
</body></html>
I also tossed it into an anonymous function so as to avoid the possibility of namespace conflicts.
Though a 'better' version would have the CSS and scripting in external files where they can be cached across pages if need be -- or even the same page if the visitor comes back later.