I recently started a blog and wanted to streamline my design process by using Bootstrap to avoid having to deal with media queries. However, I encountered an issue where the <a>
element was displaying as blue. I have another CSS file that is loaded after Bootstrap, but no matter what I tried, I couldn't get the color to change to black. Here's a snippet of my code:
/* This is from my styles.css file: */
a {
text-decoration: none;
}
header {
text-align: center;
color: black;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Blog</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<link rel="stylesheet" href="css/styles.css" />
</head>
<body class="container">
<header>
<h5>Blog</h5>
<a href="#">Home</a>
<a href="blog.html">Blog</a>
<!--blog.html is the same as this one which is home.html-->
</header>
</body>
</html>