# innerHTML showing html text

**URL:** <https://forum.kirupa.com/t/innerhtml-showing-html-text/170516>\
**Category:** web dev\
**Created:** [November 27, 2005, 12:15am UTC](https://forum.kirupa.com/t/innerhtml-showing-html-text/170516 "2005-11-27T00:15:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nathan99](https://avatars.discourse-cdn.com/v4/letter/n/96bed5/32.png) [@nathan99](https://forum.kirupa.com/u/nathan99)\
**Post date:** [November 27, 2005, 12:15am UTC](https://forum.kirupa.com/t/innerhtml-showing-html-text/170516/1 "2005-11-27T00:15:01Z")

</div>

```auto
<html>
<head>
 
<style type="text/css">
.shw {
font-weight: bold;
color: #FF0000;
}
</style>
<script language="javascript" type="text/javascript">
function cng() {
htm.innerHTML = "<font size='6'>" + ing.value;
}
setInterval(cng, 100);
</script>
 
</head>
<body>
 
<textarea name="ing" rows="10" cols="100">
Yo Mama Said What
</textarea>
<br />
<br />
<br />
<br />
<div id="htm" class="shw">
</div>
 
</body>
</html>

```

Hey guys, how would i modify this to allow the htm div to show html codes for eg, it would show

```auto
 <font size='6'>Yo Mama Said What</font>

```

any ideas?
