Can't connect CSS to HTML (Notepad++)

html-css

#1

Hello! I seem to be having trouble with some code. I can't get CSS to connect with it (CSS won't work with code). Any ideas?

This is HTML

<DOCTYPE html>
<html>
	<title> My Website </title>
	<head>
		<body>
			<p> nyan nyan nyan </p>
		</body>
	</head>
</html>

This is CSS (not much)

p {
	color: green
}

Thank you in advance.


#2

You didn't add link to link it..

eg:

<link rel="stylesheet" href="style.css" type="text/css">

for the above example you will need to save your stylesheet as style.css and have the style.css file and your HTML file in the same directory/folder


#3

Thanks! Huge help. I now can continue my website :slight_smile:


#4

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