I am completely stumped as to why this doesn\'t work. It seems the HTML file can\'t load the CSS for some reason, even though both are in the same directory. Any idea what m
Also make sure your link tag's media attribute has a valid value, in my case, I was using WordPress CMS and passed the boolean value true in the media field so it showed like that.
That's why it was giving error. There are three main attributes on which the css style loading depends.
link tag's relation rel attribute's value must be valid for a css file i.e. stylesheet.
link tag's target href attribute's value must be pointing to a valid an existing Cascading Stylesheet file. Like in your case it's ./style.css.href attribute's value. That means if your file style.css is present at the root i.e. / then you can also use /style.css in the href attribute's value or else if the file is present in the same directory in which your HTML file is present then you can use ./style.css as the value in your link tag's href attribute's value.
link tag's media attribute should be one of the following.
all keyword as your media attributes's value.screen as your media attribute's value.print keyword as your media attributes's value. Note that it also applies when you press the Print Screen button to capture the screen's image.speech keyword as your `media attribute's value.By following these rules your HTML structure for link tag will be.