Question:

Html code for text please ?

by  |  earlier

0 LIKES UnLike

is there an html code that , when the mouse pass over a text , the text bolds??

 Tags:

   Report

2 ANSWERS


  1. Yes.

    Between head tags:

    <style type="text/css">

      span:hover { font-weight: bold; )

      </style>

    Between body tags:

    <p><span>Text goes to bold on mouseover</span></p>

    Ron


  2. <html>

    <head>

    <script>

    function makebold()

    {

    el=document.getElementById("sample");

    el.style.fontWeight="bold";

    }

    function makenormal()

    {

    el=document.getElementById("sample");

    el.style.fontWeight="normal";

    }

    </script>

    </head>

    <body>

    <div id="sample" onmouseover=makebold(); onmouseout=makenormal();>place your text here</div>

    </body>

    </html>

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.