Practice what you've learned about comments and ampersand notation with the activity below.
In which situation is it best to use a comment tag?
- to indicate the start of each row in a table
- to explain what each HTML tag stands for
- to indicate where the code for an image gallery begins
- to give a title to the webpage
Comments should be used to show where sections of code start, to explain more complicated code, and to label closing tags for multiple nesting elements.
Comments should be used to show where sections of code start, to explain more complicated code, and to label closing tags for multiple nesting elements.
Comments should be used to show where sections of code start, to explain more complicated code, and to label closing tags for multiple nesting elements.
Comments should be used to show where sections of code start, to explain more complicated code, and to label closing tags for multiple nesting elements.
Why are comment tags helpful when debugging your code?
- They can keep a section of code from being parsed and displayed.
- Code within comment tags will be tested by the browser.
- The code will be displayed on the webpage as plain text.
- You can leave comments for another designer to see what you've tried so far to fix a problem.
"Commenting out" pieces of code can help you find what part of your code is causing the problem.
"Commenting out" pieces of code can help you find what part of your code is causing the problem.
"Commenting out" pieces of code can help you find what part of your code is causing the problem.
"Commenting out" pieces of code can help you find what part of your code is causing the problem.
Which character does not need to be written in ampersand notation in HTML?
- &
- <
- >
- !
The exclamation point is common. All of the other symbols here could interfere with coding if not created with ampersand notation.
The exclamation point is common. All of the other symbols here could interfere with coding if not created with ampersand notation.
The exclamation point is common. All of the other symbols here could interfere with coding if not created with ampersand notation.
The exclamation point is common. All of the other symbols here could interfere with coding if not created with ampersand notation.
Which example is written in correct ampersand notation?
-
-  
- &nbsp;
-  &
Ampersand notation is written by starting with the & symbol and ending with a semicolon.
Ampersand notation is written by starting with the & symbol and ending with a semicolon.
Ampersand notation is written by starting with the & symbol and ending with a semicolon.
Ampersand notation is written by starting with the & symbol and ending with a semicolon.
Which example uses proper syntax for writing a comment tag?
- < !-- I am a comment tag. -- >
- <!--I am a comment tag.-->
- <!----I am a comment tag.---->
- <!--I am--a--comment--tag.-->
Comment tags begin with <!-- and end with -->. There should be no spaces between the characters, nor should multiple hyphens be added to the tags or in the middle of the comment text.
Comment tags begin with <!-- and end with -->. There should be no spaces between the characters, nor should multiple hyphens be added to the tags or in the middle of the comment text.
Comment tags begin with <!-- and end with -->. There should be no spaces between the characters, nor should multiple hyphens be added to the tags or in the middle of the comment text.
Comment tags begin with <!-- and end with -->. There should be no spaces between the characters, nor should multiple hyphens be added to the tags or in the middle of the comment text.
Summary
Questions answered correctly:
Questions answered incorrectly: