Can't make it work individually from fcc

Hello everyone,

Everything goes fine with learn.fcc.com, but when I create a new html document with TextEditor, paste the exact Cat-Photo-App code and open it with Safari, the only thing I see is the code, not a web page. It doesn’t seem as when it’s on learn.fcc.com.

Would someone please explain why this occurs? Thanks everyone.

This is the code I wrote on TextEditor:

<!DOCTYPE html>
<html>
<h2>CatPhotoApp</h2>
<main>
  <p>Click here to view more <a href="#">cat photos</a>.</p>
  
  <a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
  
  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form action="/submit-cat-photo">
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</main>
</html>

Hey Berke,
You do not have body tag in your code.
You need to have body tag to run your code.
Hope it helps.

Hey aditya_p,
Thanks a lot for your help, but it still doesn’t seem to be working
The last code I tried:

<!DOCTYPE html>
<html>
<head><title></title></head>
<body>
<h2>CatPhotoApp</h2>
<main>
  <p>Click here to view more <a href="#">cat photos</a>.</p>
  
  <a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
  
  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form action="/submit-cat-photo">
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</main>
</body>
</html>

What is the extension of the file that you open with your browser?
It might be possible you are not using proper file name

It is .html. I have just checked it again.

Your code seems to work in my editor.
Try changing the browser.

I changed some format and saving settings and it’s fixed. As you said, it’s about the file type.
Thanks a lot.

If someone else would have the same problem, here’s a link that might be helpful: https://www.w3schools.com/Html/html_editors.asp

Congrats man.
Keep going.
Cheers.

1 Like