Why did a bunch of "/" show up (seemingly) randomly in my html?

Complete beginner here, So I wrote the code for a basic website on the codcademy interface, copied the text, formatted it inside TextEdit and opened it in safari before saving it as a HTML file and opening again in safari to check what my code would look like! (pls correct me if that’s an insane way to check code)

After Opening the page it was FULL of random "//“s” EVERYWHERE which I then had to delete manually from my code before trying again. Can anyone explain why? I’m assuming it’s because I testing my code wrong or it was somehow corrupted when I was saving and changing the file format, but it would be good to get a solid answer.

Some info has been deleted for privacy

Original Code:

<!DOCTYPE html>
<!--Welcome to my website!! -->
<html lang="en">
  <body>
  <body style="background-color:#FE1E42;">
    <a href="./home.html">
      <h1 style="color:#F7F4F3"> 
        <font size="10"> 
          <em>BLANK BLANK</em>
        </font>
      </h1>
    </a>
    <a href="./polmat.html">
      <img src="image link" alt="Political Material" 
    width="200"
    height="130"/>
    </a>
    <a href="./Polmatexp.html">
     <img src="image link" alt="Political Material Experience Design" 
    width="200"
    height="130"/>
    </a>
     <img src="image link" alt="Fat Of The Land" 
    width="200"
    height="130"/>
     <img src="image link" alt="BLANK" 
    width="200"
    height="140"/>
     <img src="image link" alt="Future Fictions" 
    width="200"
    height="130"/>
     <img src="image link" alt="Flag" 
    width="200"
    height="130"/>
  <div id="about">
    <h2 style="color:#F7F4F3">
      <em>About</em>
       </h2>
       <p style="color:#F7F4F3">
      My name is BLANK, I’m a 22 years old final year student in BLANK. I’m studying Communication Design. I am a passionate designer engaged in the wider world of art and design and I have a main focus on typography, book design, and branding. 
      <br>
      <br>
I have experience working with real clients, most notably BLANK film festival devloping their new logo and 2021 design ecosystem.
      <br>
      <br>
I’m passionate about the design process, and could easily spend hours working through different iterations on Illustrator. I’m well versed in the entire Creative Cloud suite with a focus on Indesign, Photoshop and Illustrator. I am a passionate speaker with great language skills, and I’m often the first to volunteer for a speaking role in a project.
      </p>
  </div>
</body>
</body>
</html>

Corrupted Code:

<!DOCTYPE html>\
  <!--Welcome to my website!! --> \
  <html lang="en">   \
  <body>   \
  <body style="background-color:#FE1E42;">     \
      <a href="./home.html">       \
        <h1 style="color:#F7F4F3">          \
        <font size="10">            \
        <em>BLANK BLANK</em>        \
        </font>       \
        </h1>     \
      </a>     \
      <a href="./polmat.html">      \
       <img src="image link" alt="Political Material"      width="200"     height="130"/>     \
      </a>     \
      <a href="./Polmatexp.html">      \
      <img src="image link" alt="Political Material Experience Design"      width="200"     height="130"/>     \
      </a>      \
      <img src="image link" alt="Fat Of The Land"      width="200"     height="130"/>      \
      <img src="image link" alt="Gaze"      width="200"     height="140"/>      \
      <img src="image link" alt="Future Fictions"      width="200"     height="130"/>      \
      <img src="image link" alt="Flag"      width="200"     height="130"/>  \
      <div id="about">     \
       <h2 style="color:#F7F4F3">       \
         <em>About</em>        \
       </h2>        \
       <p style="color:#F7F4F3">       My name is BLANK, I\'92m a 22 years old final year student in BLANK. I\'92m studying Communication Design and Visual Culture as a dual degree. I am a passionate designer engaged in the wider world of art and design and I have a main focus on typography, book design, and branding.        \
        <br>       \
        <br> I have experience working with real clients, most notably BLANK film festival devloping their new logo and 2021 design ecosystem.       \
        <br>       \
        <br> I\'92m passionate about the design process, and could easily spend hours working through different iterations on Illustrator. I\'92m well versed in the entire Creative Cloud suite with a focus on Indesign, Photoshop and Illustrator. I am a passionate speaker with great language skills, and I\'92m often the first to volunteer for a speaking role in a project.       \
      </p>   \
    </div> \
  </body> \
  </body> \
</html>\
}

Hi there!

I, too, am a beginner–but I use Visual Studio Code (which is also compatible on Mac). It allows you to see any issues with your code while you’re writing it, and you can check your HTML to see how it looks live. I am not sure as to why all of those backslashes appeared, but perhaps a text editor such as VSC will assist you in that regard.

If you have not already looked, I definitely encourage you to look at their catalog offerings such as: https://www.codecademy.com/catalog/language/html-css

1 Like

Amazing! I have it downloaded but wasn’t quite sure of its use yet! thank you xx

1 Like