# How do you display code?

**URL:** <https://forum.freecodecamp.org/t/how-do-you-display-code/539087>\
**Category:** General\
**Created:** [August 5, 2022, 12:56pm UTC](https://forum.freecodecamp.org/t/how-do-you-display-code/539087 "2022-08-05T12:56:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasper2](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jasper2/32/278637_2.png) [@jasper2](https://forum.freecodecamp.org/u/jasper2)\
**Post date:** [August 5, 2022, 12:56pm UTC](https://forum.freecodecamp.org/t/how-do-you-display-code/539087/1 "2022-08-05T12:56:23Z")

</div>

i am trying to display code on my web page but it jsut wont work do u guy know how thxs…

my code

```auto
<!DOCTYPE html>
<html>
<title>Template</title> <!--title-->
<link rel="shortcut icon" type="image/JPG" href="/images/space:stars images/aldebaran-s-uXchDIKs4qI-unsplash.jpg"> <!--logo-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>

body {
    background: white; /*linear-gradient(to right, blue, darkblue, purple, rgb(85, 0, 85))*/
}

.a1 {
    color: black;
}

.a1:hover {
    cursor: pointer;
    color: darkblue;
}

.holder {
    text-align: center;
}

.holder1 {
    margin: 10px;
}

</style>
<body>

<div class="holder">
    <h1>Complete base <a class="a1" href="#">HTML</a></h1>
    <p>What to add to start your website</p>
</div>

<div class="holder1" class="margin20px">
    <h1>First Step:</h1>
    <p>Add a <strong><ins>DOCTYPE html</ins></strong> With a <strong><ins>Exclamation mark</ins></strong> at the beginning</p>
    <code><h1></h1></code>
</div>
</body>
</html> 

```

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [August 5, 2022, 5:25pm UTC](https://forum.freecodecamp.org/t/how-do-you-display-code/539087/2 "2022-08-05T17:25:51Z")

</div>

You need to use the html entitites, use `&gt;` and `&lt;` instead of `>` and `<` to display the tags

---

<div class="post-metadata">

**Author:** ![jasper2](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jasper2/32/278637_2.png) [@jasper2](https://forum.freecodecamp.org/u/jasper2)\
**Post date:** [August 5, 2022, 5:27pm UTC](https://forum.freecodecamp.org/t/how-do-you-display-code/539087/3 "2022-08-05T17:27:28Z")

</div>

oh, ok Thanks for your help.  
❤

---

<div class="post-metadata">

**Author:** ![jasper2](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jasper2/32/278637_2.png) [@jasper2](https://forum.freecodecamp.org/u/jasper2)\
**Post date:** [August 5, 2022, 5:31pm UTC](https://forum.freecodecamp.org/t/how-do-you-display-code/539087/4 "2022-08-05T17:31:25Z")

</div>

one thing what is the & for a slash (/)

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [August 5, 2022, 5:32pm UTC](https://forum.freecodecamp.org/t/how-do-you-display-code/539087/5 "2022-08-05T17:32:39Z")

</div>

I don’t know, you can try to google it 🙂

---

<div class="post-metadata">

**Author:** ![jasper2](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jasper2/32/278637_2.png) [@jasper2](https://forum.freecodecamp.org/u/jasper2)\
**Post date:** [August 5, 2022, 5:33pm UTC](https://forum.freecodecamp.org/t/how-do-you-display-code/539087/6 "2022-08-05T17:33:37Z")

</div>

i tryed but it wouldnt give me the answer it just came up with everything but what i wanted

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [August 5, 2022, 5:34pm UTC](https://forum.freecodecamp.org/t/how-do-you-display-code/539087/7 "2022-08-05T17:34:04Z")

</div>

what have you searched for?

---

<div class="post-metadata">

**Author:** ![jasper2](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jasper2/32/278637_2.png) [@jasper2](https://forum.freecodecamp.org/u/jasper2)\
**Post date:** [August 5, 2022, 5:34pm UTC](https://forum.freecodecamp.org/t/how-do-you-display-code/539087/8 "2022-08-05T17:34:36Z")

</div>

what’s the & for slash code"

what it gave:  
As a very common character, the slash (as “slant”) was originally encoded in ASCII with the decimal code **47 or 0x2F**. The same value was used in Unicode, which calls it “solidus” and also adds some more characters: U+002F / SOLIDUS. U+2044 ⁄ FRACTION SLASH.

---

<div class="post-metadata">

**Author:** ![jasper2](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jasper2/32/278637_2.png) [@jasper2](https://forum.freecodecamp.org/u/jasper2)\
**Post date:** [August 5, 2022, 5:36pm UTC](https://forum.freecodecamp.org/t/how-do-you-display-code/539087/10 "2022-08-05T17:36:42Z")

</div>

oh no sorry i found it:

```auto
&sol;

```

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [August 5, 2022, 5:37pm UTC](https://forum.freecodecamp.org/t/how-do-you-display-code/539087/11 "2022-08-05T17:37:12Z")

</div>

good job in working out how to find something on google

---

<div class="post-metadata">

**Author:** ![jasper2](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jasper2/32/278637_2.png) [@jasper2](https://forum.freecodecamp.org/u/jasper2)\
**Post date:** [August 5, 2022, 5:37pm UTC](https://forum.freecodecamp.org/t/how-do-you-display-code/539087/12 "2022-08-05T17:37:42Z")

</div>

yh i couldnt fined what i wanted before

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [February 4, 2023, 5:38am UTC](https://forum.freecodecamp.org/t/how-do-you-display-code/539087/13 "2023-02-04T05:38:17Z")

</div>

Closed on February 4, 2023, 5:38am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
