+ 1

My html file is not showing up at browser

Hello! I have already made a couple of pages with html files and css. But this time, nothing is showing up when i put my html file into the browser. It’s a really simple code just so that i can see if it is working or not. But not even the red box is showing up, and when i press ”inspect”, there is nothing there apperently. And yes, i have saved them both! Help, im going crazy😭What can be the problem? I have linked the css file in html.

10th Jan 2020, 11:50 AM
Celina Eftihidis
Celina Eftihidis - avatar
11 Answers
+ 9
Celina Eftihidis it's may be an reason that your css file is not linked properly. If your file of css is not present in same file than you have to use the path of the css file to link with html file. Or you can put your css file in the folder where your html file is exist then by calling name of css file will linked both together. for working of external css linking in PC you must know two thing 1) if the css file is in same folder in which your html file is present. Then to link css you just need to include the css file name and extension in href like this <link rel="stylesheet" href="file name.css> 2) if file is in other folder then in href include the path of that file like if it is Folder d where it is in new folder where an folder named project where it is located then you should give path like this href="D:/new folder/project/file.css If in same folder then simply use this for connecting the css file <link rel="stylesheet" href="file name.css>
10th Jan 2020, 2:04 PM
GAWEN STEASY
GAWEN STEASY - avatar
+ 3
Try pressing Ctrl+U in the browser - you should see exactly what you wrote in your code editor. If you see your code then you've made some error (you can post it and we can have a look), and if you don't, then you might have gone crazy already and dragged the wrong file into the browser! If I had to guess, you probably have an extra < or > somewhere and the browser gets confused. Something like that.
10th Jan 2020, 12:02 PM
Schindlabua
Schindlabua - avatar
+ 2
Like Schindlabua said, you might have gone crazy already 😆😆😆 Come and share that crazy code. Let us all go crazy together 😂
10th Jan 2020, 1:14 PM
Ipang
+ 2
i don’t get anything when i press ctrl+u(im on a mac tho) I don’t know how to share my code..just copy it and put it here? because i cant post a pictuređŸ€”
10th Jan 2020, 1:49 PM
Celina Eftihidis
Celina Eftihidis - avatar
+ 2
thanks for the help guys! i tried it on my windows computer and it works(not my gradient background tho) but on my mac it doesnt work idk why but..it is what it is i guess😂
10th Jan 2020, 4:01 PM
Celina Eftihidis
Celina Eftihidis - avatar
+ 1
I copypasted your code into the code playground and it seems to work fine: https://code.sololearn.com/W838OeDcb2oY/?ref=app In Safari, you can show the page source code with Preferences > Advanced > Show Develop Menu in Menu bar Develop > Show Page Source In the other browsers I'd assume it's Command+U but I haven't checked.
10th Jan 2020, 1:59 PM
Schindlabua
Schindlabua - avatar
0
Can you open the following link? a how to on sharing links https://www.sololearn.com/post/74857/?ref=app
10th Jan 2020, 1:51 PM
Ipang
0
(FILE NAME mittCV.html) <!DOCTYPE html> <html> <head> <meta charset=UTF-8> <link rel="stylesheet" type="text/css" href="mittCV.css"> <title>Celinas CV</title> </head> <body> <div class="box"> hej</div> <div class="test"></div> </body> </html> (FILE NAME mittCV.css) .box { width: 50vh; height: 50vw; background-image: linear-gradient (red, pink, purple, blue) ; } .test{ background-color: red; height: 70px; width: 70px; }
10th Jan 2020, 1:52 PM
Celina Eftihidis
Celina Eftihidis - avatar
0
Ho
11th Jan 2020, 3:55 PM
Saddam Hossain
0
Hi
12th Jan 2020, 9:41 AM
Himmat Khan
Himmat Khan - avatar