I'm new to coding and have only learned how to use HTML and CSS. If I use notepad++ how do I make an external stylesheet?
1 Answer
You can add CSS styles to an HTML document by using the <link> element. It's documentation is here.
Here is a simple example that assumes both files are in the same directory:
styles.css
.my-class {
background-color: red;
}
index.html
<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="./styles.css">
</head>
<body>
<p class="my-class">The background of this paragraph will be red.</p>
</body>
</html>
linkelement. If it isn't working you'll be able to boost your debugging skills by learning how to combine Apache access logs (and eventually MariaDB general query logs) with a log viewer. I highly recommend Hoo WinTail with highlight filters that allow to launch an external program (e.g. sounder.exe) that can alert you that your error matched and you know when to look at your logs: very powerful. Good luck!