Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

131
Vistas
CSS not showing up when HTML loaded

I am having an issue linking my CSS to HTML on my computer. My html file has the correct link and name for the CSS file but when I open by HTML file in chrome there is no styling. If I open up dev tools after that and go to source, only my js and html file show in the folder even though there is json, css, html, and js file in the project folder. The CSS file name is index.css, the js file name is index.js, and the html file name is index.html. If you know what could be wrong please let me know. I ran both files here and they work here but not when I try and run my html file on chrome.

CODE:

body {
    margin: 0;
    padding: 10px;
    font-family: Arial, Helvetica, sans-serif;
    min-width: 400px;
}

input {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #5f9341;
    margin-bottom: 4px;
}

button {
    background: #5f9341;
    color: white;
    padding: 10px 20px;
    border: 1px solid #5f9341;
    font-weight: bold;
}

#delete-btn {
    background: white;
    color: #5f9341;
}

ul {
    margin-top: 20px;
    list-style: none;
    padding-left: 0;
}

li {
    margin-top: 5px;
}

a {
    color: #5f9341;
}
<!DOCTYPE html>

<html lang="en">

<head>
  <link src="index.css" ref="stylesheet" type: "text/css">
</head>`enter code here`

<body>
  <input type="text" id="input-el">
  <button id="input-btn">SAVE INPUT</button>
  <button id="tab-btn">SAVE TAB</button>
  <button id="delete-btn">DELETE</button>
  <ul id="ul-el">
  </ul>
  <script src="index.js"></script>
</body>

</html>

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Instead of "src" it needs to be "href", and "type:" must be "type="

<link href="index.css" rel="stylesheet" type="text/css">
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda