MimiTex Posted April 1, 2019 Share Posted April 1, 2019 When I separate css from html file, when opening the html in the browser, the structure of my page is all messed up. Why does this happen? Link to comment Share on other sites More sharing options...
Funce Posted April 3, 2019 Share Posted April 3, 2019 Your CSS contains the information required to make your HTML look nice. Make sure that you've linked your CSS back through your HTML page by using the <link> element like here. https://www.w3schools.com/css/css_howto.asp Try something like this (replace mystyle.css with your own filename) <link rel="stylesheet" type="text/css" href="mystyle.css"> Link to comment Share on other sites More sharing options...
ishan_shah Posted April 5, 2019 Share Posted April 5, 2019 I think you should check your reference once. Also, check whether your HTML file and External CSS file is in a single folder or not. If both files are in a single folder then you should write a link tag between head tag as follows: <link rel="stylesheet" type="text/css" href="yourcssfilename.css"> Link to comment Share on other sites More sharing options...
shaili_shah Posted July 4, 2019 Share Posted July 4, 2019 (edited) you must forgot to link your css file with html file: <link rel="stylesheet" type="text/css" href="CssFileName.css"> Edited July 4, 2019 by shaili_shah Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now