how to reference external css in an HTML page

Asked

Viewed 4,312 times

3

I’m learning html but I don’t know why I’m not getting calls a css file, which I created separately for my html.

<html>
    <head>
        <meta charset="UTF-8">
        <title> aula 5 </title>
        <link rel="styleshet" type="css" href="atyle9.css"/> 
    </head>
    <body>
        <p> Este é um paragrafo com elemento <em>EM </em> nele </p>
    </body>
</html>

2 answers

5


The body that references the CSS is incomplete. Inside href wouldn’t it be "style9.css" instead of "atyle9.css"? try to put it this way:

<link rel="stylesheet" type="text/css" href="atyle9.css"/> 
  • 1

    Thank you very much ran XD, I am Inicando this business is kind of complicated.

  • 1

    Always dispose. If you solved your problem do not forget brand as correct answer.

1

Unused type="css" and yes type="text/css" also checks if the file path and name are correct.

  • The path was wrong too..

Browser other questions tagged

You are not signed in. Login or sign up in order to post.