-2

I need help with including HTML code as plain text on my page. Could you tell me the best way how to place the code on my page between <section> & </section> tags?

Something like this:

Example

Thanks in advance!

So I want to place the HTML code like the w3schools posted this HTML Example on their page with the all tags and tags are colored.

Milos Petrovic
  • 183
  • 1
  • 2
  • 9

3 Answers3

1
$(selector).text( ... )

The use of the text() function sets the value as a TextNode, which will cause the html not to render on the page.

Taplar
  • 24,788
  • 4
  • 22
  • 35
  • I think he just means displaying the tags in a html textbox (not the inner text of HTML) – Steve Oct 31 '17 at 15:31
0

< code>< /code> Perhaps with this tag you can do it

<code><h1>Mi header</h1></code>
Geomorillo
  • 985
  • 1
  • 9
  • 14
0

You can use <pre></pre>

For example:

This is me code
Bzzoiro
  • 89
  • 4