0

For instructional purposes, I need to write <div> as a string in HTML.

How can I write this, for example, in between a paragraph tag: <p> Your <div> here... </p> without it actually becoming a <div> element?

Johhhn
  • 19
  • 8

2 Answers2

0

Use <xmp> tag

<xmp><div></xmp>
MefAldemisov
  • 867
  • 10
  • 21
0

Use HTML entities. Read this page for more details:

https://www.w3schools.com/html/html_entities.asp

Andrea Del Bene
  • 2,521
  • 1
  • 15
  • 20