Set HTML tag as text
Description
The following code shows how to set HTML tag as text.
Example
<html>
<head>
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {<!--from w w w . jav a2 s .co m-->
$("p").text("<b>bold</b>bold.");
});
</script>
</head>
<body>
<p>java 2s.com</p>
<DIV></DIV>
</body>
</html>