0

How does one open a browser to view the combined results of both html and CSS code?

So I have written some code in HTML and CSS using Visual Studio Code. When I try to open the html file, I see only the html effects but not the css effects. I tried downloading code from an online tutorial to make sure that it wasn't a problem with linking CSS file to html file.

21st Dec 2019, 8:58 AM
Lim Yee Wee
Lim Yee Wee - avatar
6 Respuestas
0
The CSS file most likely has been cached by your browser. Try "CTRL + F5" or insert "?v=0.x" at the end of the url for the css file's url in the link element. The 'x' in the URL can be anything, but has to be different in each save so it be an uncached version to make the browser retrieve the lastest version of the style.
21st Dec 2019, 9:07 AM
SoundInfinity
SoundInfinity - avatar
0
Hi I tried what has been suggested but it still doesn't work. Can a kind soul walk me through how to open the web browser after you have written the code? Becoz I don't think it is a code problem because I downloaded the code from this tutorial https://www.youtube.com/redirect?q=http%3A%2F%2Fwww.traversymedia.com%2Fdownloads%2Facme_website.zip&event=video_description&redir_token=dzlDVni_ep5E2OlNDRFl5RIF-YR8MTU3NzAwNzQ0NEAxNTc2OTIxMDQ0&v=Wm6CUkswsNw
21st Dec 2019, 9:41 AM
Lim Yee Wee
Lim Yee Wee - avatar
0
I have no idea how to extract the zip... It suddenly worked a few moments ago after hours of trying. but I have no idea how what I clicked I think it was something really simple though
21st Dec 2019, 9:58 AM
Lim Yee Wee
Lim Yee Wee - avatar
0
Ok I juz realised that it opens correctly occasionally when I click on the file for some weird reason thks anyways!
21st Dec 2019, 10:07 AM
Lim Yee Wee
Lim Yee Wee - avatar
0
If you are new to HTML and CSS, then I would suggest you to write CSS within style tags in the same file where you write html code.
22nd Dec 2019, 9:58 AM
UBAID SHAIKH
UBAID SHAIKH - avatar
0
Make sure you have linked your css file to your html code.
23rd Dec 2019, 6:30 AM
Sushanth m
Sushanth m - avatar