2019-04-23 18:50:01

I want to show my html code, but I can't for the life of me find a solution. I tried the all mighty goggle. Didn't find nuffin. Any <code> tags like in the forum? Or better yet, anyone know how they made thos so I could just include them in my site?

----------
“Yes, sir. I am attempting to fill a silent moment with non-relevant conversation.”
“You don’t tell me how to behave; you’re not my mother!”
“Could you please continue the petty bickering? I find it most intriguing.” – Data (Star Trek: The Next Generation)

2019-04-23 18:55:38

Copying other people is bad.
that being said, the <code> and </code> tag are what you are looking for.. Also, <pre> </pre> which tell your browser this stuff is preformatted

Nathan Smith
Managing Director of Nathan Tech
It's not disability
It's ability!

2019-04-23 18:58:25

so

 like <code><A href="url>">lintext.</a> 

would work on a webpage, showing the <a href thing spelled out?
And I wasn't going to copy, I just wanted to know generally  if anyone knew how to do something like what they did.

----------
“Yes, sir. I am attempting to fill a silent moment with non-relevant conversation.”
“You don’t tell me how to behave; you’re not my mother!”
“Could you please continue the petty bickering? I find it most intriguing.” – Data (Star Trek: The Next Generation)

2019-04-23 23:28:11 (edited by dardar 2019-04-23 23:28:35)

Hi there.
I stand corrected.
After having researched the issue, I found it is a little more complicated than I expected.
Here's a clip from an article I read on the subject:
The tried and true method for HTML:
1. Replace the & character with &amp;
2. Replace the < character with &lt;
3. Replace the > character with &gt;
4. Optionally surround your HTML sample with <pre>and/or <code> tags.

source: https://stackoverflow.com/questions/282 … de-in-html

Nathan Smith
Managing Director of Nathan Tech
It's not disability
It's ability!

2019-04-24 13:10:13

So to sho <A href="https://google.com">google.</a> in code would be:
<code>lt;a href="https://google.com"gt; google.lt/agt</code>
That would show it in code?

----------
“Yes, sir. I am attempting to fill a silent moment with non-relevant conversation.”
“You don’t tell me how to behave; you’re not my mother!”
“Could you please continue the petty bickering? I find it most intriguing.” – Data (Star Trek: The Next Generation)

2019-04-24 16:06:54 (edited by Ethin 2019-04-24 16:07:04)

@5, nope, it would be:

<code>&lt;a href="https://google.com"&gt; google.&lt;/a&gt;</code>

The way the forum does it is it doesn't parse HTML tags in posts. It renders them as plain text and uses a parser to search for BBCode, and if it finds a valid tag, it sets up the appropriate HTML for that tag and (I think) inline-replaces the tag with the HTML.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2019-04-24 16:58:40 (edited by redfox 2019-04-24 16:59:23)

@everyone, I found an eaiser way!
<xmp></xmp>
Makes it plain text and doesn't parce it as html!

----------
“Yes, sir. I am attempting to fill a silent moment with non-relevant conversation.”
“You don’t tell me how to behave; you’re not my mother!”
“Could you please continue the petty bickering? I find it most intriguing.” – Data (Star Trek: The Next Generation)