+ 3
How do you link css to html?
I tried to link it on my laptop but it didn't work even when I put them in the same folder
10 Respuestas
+ 7
<!--A simple example👇-->
<!DOCTYPE html>
<html>
<head>
<title>my web</title>
</head>
<body>
<p id="error">my text</p>
<!--css👇-->
<style>
#error{
font-size:40px;
}
</style>
<!--css👆-->
<!--js👇-->
<script>
alert("hello");
</script>
<!--js👆-->
</body>
</html>
+ 6
<link rel=“stylesheet” type=“text/css” src=“style.css”> replace style.css with your css file name.
+ 3
Thank you but I tried it and it still isn't working. Do you know any other way?
+ 2
LOGA
+ 1
Do I have to write the full location of the file.
0
if css file is in same directory with your html files no need to specify the location
0
<link rel="stylesheet" href="style.css">
i dont know if that is any different than @Dasun;
replace " style.css" with the css file name
0
Thank you guys, but I am trying on notepad++ but it still isn't working
0
well if you dont mind, i would recommend Visual Studio Code (app) it works pretty well with me ‘still a beginner’, and codepen.io
0
Of course I don't mind, thanks for your help and advice, I'm downloading it now.