html5 - how to show html code as text in html webpage -


i'm asking on how show html code on tutorial html website, example show user how make link?

<a href="#">text</a> 

thanks in advance

with cdatasection. cdatasection object represents cdata section in document.

a cdata section contains text not parsed parser. tags inside cdata section not treated markup , entities not expanded.

you can use in xml sample :

<![cdata[<tag>some text</tag>]]> 

it interpreted such :

&lt;tag&gt;some text&lt;/tag&gt; 

or in program output. sample css :

<style type="text/css"> /*<![cdata[*/ body { background:black;  }      /*]]>*/ </style> 

hope you.


Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -