Forum Moderators: open
I'd like to put a paragraph on one of my pages that the search engines won't see. I'd like to do it with Javascript. Is there a way to simply wrap the paragraph with a couple lines of javascript code?
I don't want to have an external .js if I can avoid it.
Do I need to put something like this at the top of my page?
<script src="Externaljs.js" language="javascript" type="text/javascript"></script>
Again, sorry if this is a silly question. But, I'm a dunce when it comes to code.
Thanks for any help.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<style type="text/css">
</style>
<script type="text/javascript">
window.onload=function(){
document.getElementById('d2').innerHTML="Un-crawled content."
}
</script>
</head>
<body>
<div>
Content of choice.
</div>
<div id="d2">
</div>
<div>
More content.
</div>
</body>
</html>
Perhaps simpler than all of this would be to place the text in a separate document and load it an iframe. The separate document could have a robots meta tag to exclude crawlers. [robotstxt.org...]
And yet simpler still, is to create an image of the text and incorporate in the document with an img tag.