Connecting HTML and CSS

I have been new to CodeAcedemy and I have encountered a problem when I was doing the “Build Your Own Cheatsheet” activity (https://www.codecademy.com/practice/projects/independent-project-html-documentation). I realized that code in other places would not work inside the text editor for this project. In particular, the HTML and CSS codes would not link together despite having in it. What else do I do in order to connect HTML and CSS together?

For example:

Does not completely render out a blue

text in this particular task’s code editor.

However, in the code editor that was in the “Olivia Woodruff Portfolio” (https://www.codecademy.com/paths/web-development/tracks/styling-a-website/modules/learn-css-selectors-visual-rules/projects/css-visual-rules-project) completely works and renders out the blue

text no problem.

What am I doing wrong in the code editor in the “Build Your Own Cheatsheet” editor?

First thing to do when the CSS won’t link correctly is to compare your linking script to the file structure, and make sure it’s;
a) pointing to the correct place and
b) the tag is structured correctly.

Secondly, the identifier you have used there in the CSS is to point to a class called blue. Make sure that the element you want changed has a class named blue, and if not then change either the CSS or the HTML to match. If you’re still having trouble, please also post your HTML code with the file structure in view (if you haven’t done that before, click the folder icon next to index.html) and I’ll see if I can spot anything.

3 Likes


Here is the HTML portion of the code, I added the element with the attributes and the corresponding values and it still doesn’t seem to work for me.

Check the name of your CSS document (styles.css). Check the name you called it in your HTML code (style.css). Are they the same? Should they be the same?

4 Likes

Oh wow, I didn’t realize that, thank you so much for having a keener eye than mine, I think I should’ve been more careful when looking at the code files. Thanks a lot.

1 Like