我刚开始使用 CSS,在为链接添加颜色时遇到了一些麻烦。当我添加链接颜色时它不起作用,所以我尝试自己修复它,但只会让我的网站更加混乱。这是我的代码。
<html>
<head>
<title> website </title>
</head>
<style type="text/css">
body
{
background-color:#474747;
color:#e1e1e1;
font-family:"Courier New";
text-align:center;
{
a:link
{
color:#00FFFF;} /* unvisited link */
a:visited
{
color:#4DFF4D;} /* visited link */
a:hover
{
color:#00FFFF;} /* mouse over link */
a:active
{
color:#00FFFF;} /* selected link */
}
h1
{
font-size:40;
}
h3
{
font-size:20;
text-decoration:underline;
}
p
{
font-size:12;
}
</style>
<body>
<h1> heading </h1>
<hr size="3" color="red" />
<h3>Welcome!!!</h3>
<p>Welcome to my website!</p>
<h3>Links</h3>
<p><a href="http://www.youtube">Youtube</a></p>
</body>
</html>
它是在 Html 代码中还是在 Css 编码中?请帮忙。