Hi, I am not able to see the CSS effect on the web browse to HTML file using Visual code. I can run HTML file in chrome and can see login page

22 views Asked by At

I created login page in HTML and run in chrome and able to see the result but when I apply CSS effect like margin, padding and color but not able to run it. Do you mind how to connect CSS effect in visual code or do I need any extension for it. Thank you. I am a beginner.

I tried installing extension and watching youtube but could not find to fix it.

1

There are 1 answers

2
Adani On

While your wording for your question is confusing, I think I understand the gist. If the CSS you have made isn't applying then there are a few possible reasons why.

  1. You haven't included an include CSS statement. The code below is what you should include, with mystyle.css being whatever your CSS file is called. This goes at the top of your html page, ideally in the head tag.

<link rel="stylesheet" href="mystyle.css">

  1. If you have done that, then your spelling could be an issue within the CSS itself, so make sure to double check that you are referencing the correct elements

  2. If both these solutions don't work, then add the code below above your body tag to check that you are able to even add CSS.

<style>
body {
  background-color: coral;
}
</style>

If these don't work than it might be a more complicated issue involving your system. Goodluck, and I would recommend following this tutorial so that you can understand the basics of html.