Thanks. That only will work with greater than and less than. I thought there was somethign like <blockquote> that will enclose the code, and any tag wrote in it, wouldn’t be interpreted as thml tags. for example, the documentation page i left for React in which you see the code in a block being displayed. However, thanks for the suggestion. I can work a way around what I want to make with the info you gave me until I stumble with a better solution!
@ilenia’s solution is the best solution. There is no HTML tag that does what you want. If you don’t want the less than and greater than characters to be interpreted as tags then you have to replace them with < and >.
There used to be an <xmp> tag that did this but is has long since been deprecated and should not be used.
There is a JS workaround. You can set the textContent property:
Then it takes lots of coding just to write a simple block of code explaining settings or stuff with code. I was able to find the tag <pre> which in this case, it is used for code that has no tags. For example,
body{
background-color:red;
}
if there was something for html not to be interpreted, would save me lot’s of time!. Thanks for the help!