Question how to link between css and html

Asked

Viewed 479 times

0

I’m a beginner in this area, so I think it’s a stupid problem, but I’m not able to create a link between my html file and css, as taught in the following class (follow the video link https://www.youtube.com/watch?time_continue=281&v=A3mlsAk4G2k and the time in question 2:30 to 4:40, I am using the Notepad++ as editor), then I do the commands as requested;

<html lang = "pt-br">
<head>
    <meta charset ="UTF-8"/>
    <title>Tudo Sobre Google Glass</title>
    <link rel="stylesheet" type = "text/css" href ="_css/estilo.css"/>
</head>
<body>
<div id="interface">
    <header id = "cabecalho">
    <hgroup>
    <h1>Google Glass</h1>
    <h2>A revolução do google está chegando</h2>
    </hgroup>
    <img src="_imagens/piro-1.jpg"/>
    </header> 

but style ta my page back to square one, someone could guide me with that question...

3 answers

1


if your css file is in the same folder(location) as your html just call it this way <link rel="stylesheet" href="meuArquivo.css" />. If it is in a subfolder just navigate it with "/". Example: <link rel="stylesheet" href="subpasta/meuArquivo.css" />. Or if it is in the above directories just go back as many directories are needed with ".". Example: <link rel="stylesheet" href="../meuArquivo.css" />, this makes html fetch a folder previous to it.

  • Thanks Gabriel, the second option worked.

  • Okay, if it helped you mark it as :) vlw

0

To add a style to the html file you use:

<link rel="stylesheet" href="caminho-do-arquivo.css">

Inside the tag head.

0

Insert the following inside the tag <head>:

<link rel="stylesheet" type="text/css" href="./caminho_do_css.css"/>

I hope I’ve helped ;)

p.s.: Guanabara classes are mass hahahahaha

  • 1

    Vlw Arthur was helpful yes I used your tip, in conjunction with the one of the colleague above. (Guanabara and Udemy, make me question pq I still go to college hehe xD)

Browser other questions tagged

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