问题
I've tried inline CSS and also then changed to linking an external stylesheet but neither will load for me in any browser when I test the code. Could it be that I haven't saved my css file properly? How may I do that?
With the external stylesheet (my ideal option for the website) -
<!doctype html>
<html lang="en">
<head>
<title>My name Homepage</title>
<link rel="stylesheet" type="text/css" href="styles/main.css">
</head>
<body>
<h1> This is My Name</h1>
<h2>Welcome to my website.</h2>
<p> Age</p>
<p>Likes/Dislikes</p>
<p>Career</p>
<ul>
<li>Home</li>
<li><a href="About.html">About</a></li>
<li><a href="Artportfolio.html">Art Portfolio</a></li>
</ul>
</body>
</html>
My current CSS (all I have so far since I just wanted to test) -
body{
background: #000000;
}
来源:https://stackoverflow.com/questions/58827762/im-having-trouble-with-applying-css-to-my-html