The first few lines of CSS do not work?

I am now fourteen years old and have been trying to learn HTML and CSS in the last month. I understood everything and tried to create my own website. I am a big fan of the League of Legends, so I decided to do it. Everything is going beautifully, but I ran into a CSS issue. I use an internal stylesheet. For some odd reason, the first syntax doesn't work. Everything else is functioning properly.

This is a link to my site.

(Right-click and click the page view button to view the code)

According to the css code, all of the listed items should be color # 0000CD. However, nothing happens. Can someone tell me what I did wrong and how to fix it?

+4
source share
3 answers

In <style>node, remove the HTML comment:<!---Begin CSS--->

It breaks your CSS. The real CSS comment is as follows:/* I am a comment */

+8
source

Remove these comments <!---Begin CSS---> <!---End CSS--->and use the comments ( /*Begin CSS*/) before <style>and after </style>( /*End CSS*/).

+2
source

You made a html comment in your css. <!---Begin CSS--->should say it instead/* Begin CSS */

In addition, you should not have your css in your html file. Instead, between <head>and </head>there is this <link rel="stylesheet" href="css/example.css">where example.css - your css file.

+2
source

Source: https://habr.com/ru/post/1616474/


All Articles