# JS & CSS: Rollover text on URL issue

**URL:** <https://forum.kirupa.com/t/js-css-rollover-text-on-url-issue/190004>\
**Category:** web dev\
**Created:** [June 7, 2006, 11:23pm UTC](https://forum.kirupa.com/t/js-css-rollover-text-on-url-issue/190004 "2006-06-07T23:23:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rollo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rollo/32/2297_2.png) [@Rollo](https://forum.kirupa.com/u/Rollo)\
**Post date:** [June 7, 2006, 11:23pm UTC](https://forum.kirupa.com/t/js-css-rollover-text-on-url-issue/190004/1 "2006-06-07T23:23:52Z")

</div>

The code below uses css and js to present text to the user when they roll over a URL but if you test the code you will see that the text automatically gets outputted to the user when the page loads. How can i prevent that?

```auto

<style type="text/css">
sub1 {

display: none;
}
<style type="text/css">
sub2 {

display: none;
}

</style>
<script language="JavaScript">
function setVisibility(id, visibility) {
document.all[id].style.display = visibility;
}

</script>
<body >
<a href='tutorial.php' onMouseOver="setVisibility('sub1', 'inline');" onMouseOut="setVisibility('sub1','none');">Tutorial Page</a><br>
<a href='logout.php' onMouseOver="setVisibility('sub2', 'inline');" onMouseOut="setVisibility('sub2','none');">Logout</a><br>
<div id="sub1">Do you want to learn how to use the system i have spent ages writing? Then watch the tutorial and learn something</div>
<div id="sub2">Do you want tfdasfdsafd</div>

```
