HTML Introduction to HTML and CSS Adding a New Web Page Write the CSS

Theresa Greene
Theresa Greene
Front End Web Development Techdegree Student 3,815 Points

I am having trouble with previewing my resume.

I tried adding /resume.html to the url of the original Profile Page but I keep getting a "404- not found error message." Edit: The problem is not with the code but the url in the browser. It can't find the resume I'm creating to allow me to preview it.

2 Answers

Daniel Hall
PRO
Daniel Hall
Pro Student 873 Points

Hi Theresa,

Did you manage to figure this out?

Most people with this issue seem to be naming their "Resume.html" with a capital "R", which causes a 404 error as workspace URLs are actually case sensitive (something that isn't mentioned in the video).

I saw in your GitBHub that your HTML file was lowercase. Is there any possibility that you had it named "Resume.html" in your workspace but inadvertently changed it to "resume.html" in your GitHub? This seems a trivial detail but a case mismatch between what you type in your browser's address bar and how your workspace file is named will throw a 404 error every time!

Try typing your URL the same as before but as "/Resume.html" (capital first letter) and also try looking in your workspace and changing the file name from "Resume.html" to "resume.html" if it was capitalized.

ale8k
ale8k
8,299 Points

If the file you're targeting is in the same folder, you do not use a forward slash '/'. This tells it to initially look for root. Here is a snippet from w3 schools. I hope this helps:

<img src="picture.jpg"> picture.jpg is located in the same folder as the current page
<img src="images/picture.jpg">  picture.jpg is located in the images folder in the current folder
<img src="/images/picture.jpg"> picture.jpg is located in the images folder at the root of the current web
<img src="../picture.jpg">  picture.jpg is located in the folder one level up from the current folder

Further more, here is where I sourced the information I just given you: https://www.w3schools.com/html/html_filepaths.asp

Theresa Greene
Theresa Greene
Front End Web Development Techdegree Student 3,815 Points

Unfortunately, the issue is with what's displaying on the browser and not a linked image code. This is my code on Github

Daniel Hall
Daniel Hall
Pro Student 873 Points

The "/resume.html" appended to the URL was what was being typed in Theresa's browser, rather than something that was appended to a path defined in an "src" attribute. Hence: "...adding to the url of the original Profile Page".

Besides, any problem with an <img> element inside an HTML file would not explain a 404 "Page not found" error when trying to open the HTML page itself - the browser isn't getting as far as reading the HTML file.