Reputation: 1
Trying to change the colors of my h1 and h3 to blue by using external links yet it never works. Please help me.
body {
background-color: #EAF6F6;
}
h1 {
color: blue;
}
h3 {
color: blue;
}
hr {
background-color: none;
border-style: dotted none none;
border-color: grey;
height: 0px;
border-width: 5px;
width: 5%
}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>💓Rick's Personal Site</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<table cellspacing='20'>
<tr>
<td><img src="WeChat Image_20220221090440.jpg" alt="a picture of Rick"></td>
<td>
<h1>
<center>Rick Yang</center>
</h1>
<p><em>The <strong><a
href="https://en.wikipedia.org/wiki/Powerlifting">powerlifter</a></strong>.</em></p>
<p>I am an amateur powerlifter and strength trainer.
<br>I love coding and just started learning them</p>
</td>
</tr>
</table>
<hr>
<h3><strong>Education</strong></h3>
</body>
</html>
Upvotes: 0
Views: 66
Reputation: 49
I am Again. Thank you Reply me. Replace Your link Html line With this.
<link rel="stylesheet" type="text/css" href="style.css">
This well help you. For External CSS file. If you want change color when curser over on h1 and h3 than use hover Properties. If you want continuesly changing color than use @keysframe in style.
Upvotes: 0
Reputation: 49
you not define in style Tages of CSS. 1:- First you write all HTML of your page. 2:- When this is Ok then define style tag and copy all CSS code between style.
Example:-
<head>
<meta charset="utf-8">
<title>💓Rick's Personal Site</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<table cellspacing='20'>
<tr>
<td><img src="WeChat Image_20220221090440.jpg" alt="a picture of Rick">
</td>
<td>
<h1>
<center>Rick Yang</center>
</h1>
<p><em>The <strong><a
href="https://en.wikipedia.org/wiki/Powerlifting">powerlifter</a>
</strong>.</em></p>
<p>I am an amateur powerlifter and strength trainer.
<br>I love coding and just started learning them</p>
</td>
</tr>
</table>
<hr>
<h3><strong>Education</strong></h3>
</body>
<style type="text/css">
body {
background-color: #EAF6F6;
}
h1 {
color: blue;
}
h3 {
color: blue;
}
hr {
background-color: none;
border-style: dotted none none;
border-color: grey;
height: 0px;
border-width: 5px;
width: 5%
}
Upvotes: 1