RetroCUBE
RetroCUBE

Reputation: 33

Why do comments show up on the webpage

Task that I'm trying to complete: Make it so the comments in my code don't show up on the actual webpage. [enter image description here][1]

The comments I'm talking about are writen in the section above the word "GoalBike"

Code: so I think this makes a variable and sets the image to that variable, then it sets-->

<!--> remmber to comment-->

<!--> <br />  might mean to break, or to skip a line-->

<!--> depending where you close or have the closing statement for the center command is where the stuff 
will and will not be centerd. eg. like if I had closing statement at the top and closed it at the top 
then to have other stuff be centered on the webpage I would have to write the center command, 
or I could just write the center command and put all the elements that I want to be cented on the page within an then close the center command-->

  <head>
    <title>An Unexpected Journey</title>20:27 04/05/17
    <link href='https://fonts.googleapis.com/css?family=Playfair+Display:900|Raleway:300' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" type="text/css" href="style.css">
  </head>
  <body>
    <div class="container">
        <h1>GoalBike</h1>
      <a class="btn" href="#">Get Started</a>
    </div>
  </body>
</html>

Upvotes: 0

Views: 670

Answers (2)

Pavan Baddi
Pavan Baddi

Reputation: 479

You made a small change in html comments. On staring the comment you have typed <!--> remmber to comment--> so this is not a comment as per HTML instead you must use ''

Here is the HTML code with changes in comment syntax which works

<!-- remmber to comment-->

<!-- <br />  might mean to break, or to skip a line-->

<!--depending where you close or have the closing statement for the center command is where the stuff 
will and will not be centerd. eg. like if I had closing statement at the top and closed it at the top 
then to have other stuff be centered on the webpage I would have to write the center command, 
or I could just write the center command and put all the elements that I want to be cented on the page within an then close the center command-->
<!DOCTYPE html>
<html>
  <head>
    <title>An Unexpected Journey</title>20:27 04/05/17
    <link href='https://fonts.googleapis.com/css?family=Playfair+Display:900|Raleway:300' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" type="text/css" href="style.css">
  </head>
  <body>
    <div class="container">
        <h1>GoalBike</h1>
      <a class="btn" href="#">Get Started</a>
    </div>
  </body>
</html>

Upvotes: 1

JasonONeillCTG
JasonONeillCTG

Reputation: 101

The syntax for an HTML comment is as follows:

<!-- Comment goes here -->

Upvotes: 1

Related Questions