skip to Main Content

I’ve been following a guide to start learning how to code, at least a little bit. When I got to the CSS section, I created another text document where I put the code to change the color to red, then in my main document I had to put this line of code beetween <head> and </head>: <link href="estilos/estilo.css" rel="stylesheet" />; this was supposed to create a connection beetween the other document to my main one, but it isn’t changing the colour at all.

Here’s the guide for those who want to see it: https://developer.mozilla.org/pt-BR/docs/Learn/Getting_started_with_the_web/CSS_basics
(This is the portuguese version but I’m almost sure there is one in english)
Main document
Style document

I tried changing name of the documents, didn’t work, then I tried another method to change the color it changed nothing. Honestly I just don’t know what’s wrong. I’m using Notepad++ by the way.

<!doctype html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Meu site de reviews</title>
    <link href="estilos/estilo.css" rel="stylesheet" />
  </head>
  <body>
  <h1>Jogos Steam</h1>
    <img src="imagens/imagem-site-teste.jfif" alt="Exemplo de diversos jogos na plataforma Steam" />
    <p>Este é <strong>meu site</strong> onde irei fazer reviews detalhadas dos jogos que termino.</p>
    <p>Aqui está os jogos que mais venho jogado ultimamente</p>
    
    <ol>
    <li>Sifu</li>
    <li>Enter the gungeon</li>
    <li>Ultrakill</li>
    </ol>
    
    <p>Todos eles são jogos excelentes e eu recomendo muito.</p>
    
    <p>Para ver o quão eu sou bom nos jogos e confiavel basta acessar 
    <a href="https://steamcommunity.com/id/Marcellocomdois2L/">minha conta na steam</a> e checar minhas conquistas.</p>
  </body>
</html>

p {
  color: red;
}

2

Answers


  1. can you provide the code that you have? Maybe you are not referring to that file where you have the css.

    Login or Signup to reply.
  2. Are you linking to a document on your computer through files? If you are, you can put both files in the same folder and just use the direct link to the file, without the dash, i.e.,just using estilo.css. That’s how I link to files, and it works perfectly fine! I’ve also tested this just now with a .css file and it works the same way 😀

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search