CSS not showing up on project as expected

Hello guys, I am currently working on my new project on which i am done with the html part and i am currently adding the CSS part to the project. But my problem is that nothing about CSS is showing up on the project. I am supposed to link CSS to html or is the project supposed to respond automatically when i add the CSS? please help .

If you are working locally on your computer and have an html file and a CSS file you must link to the CSS file in your html with the link tag inside your header tag.

If your building your project in the browser in an online environment it may be different and some more info would help.

i am actually doing the project on codepen

On codepen you should just be able to start writing CSS. If you link your project I can take a look.

I am sorry to ask, how do i link please. I really need help

You can just copy and paste the URL from the browser you don’t need to do anything special.

Thank you sir, https://codepen.io/emilynyaruri/pen/pooQgwa

The reason why your background image wasn’t showing up is because it does not link directly to the picture but rather the webpage where the picture is located.

A nice trick to get the direct link of a picture is to right click on an image and select “Open image in new tab” and then copy the URL which gives:


So the CSS is being applied you just had the wrong link.

1 Like

I’d also like to tell you, when working on codepen you can omit the Doctype, html, head, and body tags.

Anything you put in the html section is already inside the body, that’s how codepen is setup.

You do have some syntax errors in your html and CSS.

Do you see how there is a little drop down arrow for each section of html, css, and javascript?

Click that and then click tidy. Now click it again and click analyze and codepen will give you some info on what you need to fix.

1 Like

thank you once again
for that crucial information

Please assist me in this, I don’t know how to fix this * '<option' is not a valid attribute of the <select> element.
* 'value' is not a valid attribute of the <select> element.

you never closed the select tag, so many things are considered its attributes:

<select class="dropdown" id="dropdown" name="health status"
					<option value="Normal ">Normal</option>

1 Like

thank you for your help