Hi. So i’ve just started on the “Build a technical documentation Page”.
I decided to do it on HTML, on information taken from https://en.wikipedia.org/wiki/HTML .
Part of the challenge/user story involves using the <code>
tag. Which seems fine, when the <code>
tag isn’t wrapped around HTML code.
So trying to wrap <code>
tags around <p>
doesn’t do anything (as it treats the <p>
as part of the HTML code itself. So i’ve started by doing this, <code><</code><code>p></code>
.
I’m hoping that there’s a better way :), but after inspecting the HTML in the wiki page itself, it seems they have to break out the “<” in the code also.
Even so, i thought i’d ask here and see if anyone can offer any advice, either to confirm that’s the only way, or a better idea :).
This is my CodePen for it https://codepen.io/PMorgan/pen/LwOGqW (remember i’ve only just started on it please :P)
Thanks all
Hello @PMorgan,
I am not getting what you’re trying to mean. Did you mean making the whole block of a paragraph in code form ? If so, then use this:
<code><p></p></code>
Check out the HTML entities.
In this case, you can you can use <
for <
and >
for >
, where lt stands for the less than sign and gt stands for the greater than sign.
Example:
<p> becomes <p>
1 Like
Brilliant! thanks for this!
It seems i can generally get away with just using the <
to break the code so that it shows up as text, but should i be using both anyway?