Use CSS value when creating new tag
<html> <head> <script type="text/javascript" src="js/jquery-1.3.2.js"></script> <script type="text/javascript"> $(document).ready(function(){ var color = $("b").css("background-color"); alert(color); $("b").html("<span style='color:" +color + ";'>" + color + "</span>."); }); </script> </head> <body> <body> Highlight all to see me. <b>Hello</b> </body> </html>