The brackets do not allow me to change the background color of even an empty document using external CSS

I use brackets for the school image and try to move div tags next to each other, but have not experienced any changes in the code visualization, and I wanted to check if there is a problem with external CSS, so I tried to change the background color without any success and even could not change the background color of a correctly configured blank document.

I used the following to try and change the color.

body {
    background-color: green;
}

And this is empty html for testing

<!DOCTYPE html>
<html>
    <head>
        <title>Solitare</title>
        <link rel="stylesheet" href="Untitled-2.css" type="tex/css">

    </head>
    <body>

    </body>
</html>

Am I missing something dazzlingly obvious or is there another problem?

Many thanks. G. Ward

+4
source share
3 answers

You probably have an error in <link rel="stylesheet" href="Untitled-2.css" type="tex/css">try<link rel="stylesheet" href="Untitled-2.css" type="text/css">

body {
    background-color: green;
}
<!DOCTYPE html>
<html>
    <head>
        <title>Solitare</title>
        <link rel="stylesheet" href="Untitled-2.css" type="text/css">

    </head>
    <body>

    </body>
</html>
Run code
+3

! "" "tex"

<link rel="stylesheet" href="Untitled-2.css" type="tex/css"

<link rel="stylesheet" href="Untitled-2.css" type="text/css"

+1

you spelled textincorrectly in type="tex/css", but it works fine despite spelling incorrectly.

I think you need to save the code ( ctrl+ S) and then refresh the browser window to see the changes.

Test it here codepen

0
source

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


All Articles