my html is not linking with my css on chrome os


my code is not linking with my css

<!DOCTYPE html>
    <link href="main.css" rel="slylesheet" text="text/css">
        <div class="container">
            <img src="beens.jpg" alt="logo" class="logo">
                    <li><a href="#">about</a></li>
                    <li><a href="#">games</a></li>
                    <li><a href="#">contact</a></li>
                    <li><a href="#">blog</a></li>

it worked on my flash drive but not localy

.container {
    width: 80%;
    margin: 0 auto;
.header {
    background: rgb(51, 146, 153);
li {
  color: rgb(142, 15, 15);

my background is still white plz help

i tryed rewriting my link code and checking here


You have a typo here: <link href="main.css" rel="slylesheet" text="text/css">

It is supposed to be stylesheet

Also you are calling your header as a class .header
But since you didnt give it a class and want to call the tag you need to set it to

header {
    background: rgb(51, 146, 153);

Answered By – Spyr0

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published