# How do I link the css to the html using codepen

**URL:** <https://forum.freecodecamp.org/t/how-do-i-link-the-css-to-the-html-using-codepen/505939>\
**Category:** Curriculum Help\
**Tags:** css, html\
**Created:** [April 24, 2022, 4:53am UTC](https://forum.freecodecamp.org/t/how-do-i-link-the-css-to-the-html-using-codepen/505939 "2022-04-24T04:53:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![LauGonz](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/laugonz/32/257254_2.png) [@LauGonz](https://forum.freecodecamp.org/u/LauGonz)\
**Post date:** [April 24, 2022, 4:53am UTC](https://forum.freecodecamp.org/t/how-do-i-link-the-css-to-the-html-using-codepen/505939/1 "2022-04-24T04:53:14Z")

</div>

**Tell us what’s happening:**  
Describe your issue in detail here.  
I tried to give style to my html but is not taking.

**Your code so far**  
html

```auto
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
		<title>Fredy Mercury</title>
    <link rel="stylesheet" href="{CSS RESET CHOICE}">
  </head>
  <body>
    <main id="main">
      <div class="div-title">      
        <h1 id="title">Freddy Mercury</h1>
        <h4>A man with an unique voice.</h5>
      </div>
      <div id="img-div">
        <img id="image" 

```

css

```auto
.div-title{
  background-color: ##D3D3D3;
}

```

**Your browser information:**

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36`

**Challenge:** Build a Tribute Page

**Link to the challenge:**

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/2022/responsive-web-design/build-a-tribute-page-project/build-a-tribute-page)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![LauGonz](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/laugonz/32/257254_2.png) [@LauGonz](https://forum.freecodecamp.org/u/LauGonz)\
**Post date:** [April 24, 2022, 4:55am UTC](https://forum.freecodecamp.org/t/how-do-i-link-the-css-to-the-html-using-codepen/505939/2 "2022-04-24T04:55:20Z")

</div>

> **[oNpRXZM](https://codepen.io/lauragonz/pen/oNpRXZM)**
>
> ...

---

<div class="post-metadata">

**Author:** ![LauGonz](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/laugonz/32/257254_2.png) [@LauGonz](https://forum.freecodecamp.org/u/LauGonz)\
**Post date:** [April 24, 2022, 5:13am UTC](https://forum.freecodecamp.org/t/how-do-i-link-the-css-to-the-html-using-codepen/505939/3 "2022-04-24T05:13:00Z")

</div>

mistake found, sorry for bothering.

---

<div class="post-metadata">

**Author:** ![jwilkins.oboe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jwilkins.oboe/32/179497_2.png) [@jwilkins.oboe](https://forum.freecodecamp.org/u/jwilkins.oboe)\
**Post date:** [April 24, 2022, 5:31am UTC](https://forum.freecodecamp.org/t/how-do-i-link-the-css-to-the-html-using-codepen/505939/4 "2022-04-24T05:31:25Z")

</div>

Glad you figured it out.

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (`</>`) to add backticks around text.

 ![Pre-formatted-text](https://global.discourse-cdn.com/freecodecamp/original/3X/1/b/1b18854f1059217f29370444396145cc3a0cd8ae.gif)

See [this post](https://forum.freecodecamp.org/t/forum-code-formatting/25574) to find the backtick on your keyboard.  
**Note:** Backticks (`) are not single quotes (’).

---

<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:** [October 23, 2022, 5:31pm UTC](https://forum.freecodecamp.org/t/how-do-i-link-the-css-to-the-html-using-codepen/505939/5 "2022-10-23T17:31:31Z")

</div>

Closed on October 23, 2022, 5:31pm UTC

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