Commenting in html


<!DOCTYPE html>
 <!This is a comment in HTML, The statement above declares t o the web browser what kind of language is being used, always declare!!!-->
 </html><!Anything between the starting of this line and the ending /html within the symbols is HTML code -->
<! Angle brackets - In HTML, the characters < and > are known as angle brackets.
HTML element (or simply, element) - HTML code that lives inside of angle brackets.
Opening tag - the first, or opening, HTML tag used to start an HTML element.
Closing tag - the second, or closing, HTML tag used to end an HTML element. Closing tags have a forward slash (/) inside of them.
With the exception of a few HTML elements, most elements consist of an opening and closing tag.
"I can't seem to paste an example of code into a comment"(The quotation marks are to cancel the apostrophe)

If a Question of mine goes unanswered, will it be?

That is not the complete syntax. The document type declaration is not a comment, and neither is it HTML. A comment looks like,

<!-- this is a comment -->


Thank you sooo much, I totally did not think of that, also how do you end a comment? is it just "-->"


Yes, as long as you don't use quotes. The only place we use quotes in HTML is in element attributes, never on content, unless intentional (for the reader to see).

HTML does not have a distinction between inline, single line, or multiple lines. The same syntax applies in all.

    <p>This is some text <!-- inline comment --> that contains an
    inline comment. Notice that extra space characters are ignored.</p>

    <!-- this is a single line comment -->

        When we have a block of text that
        that we wish to include in the source
        file, such as title, version, author and
        attribution, we can write a nice orderly
        multi-line comment to convey our message.

If a Question of mine goes unanswered, will it be?

Thanks for the reply, explanation, and the like to my question :sunglasses:. It is very greatly appreciated


Also If anyone sees any problems or errors in my comments or question, please let my know because I really want to improve my learning and the learning of others :slight_smile:


Focus upon your individual self. There will be time enough to help others when once you have the solutions to all your own problems. Better you face up to that fact and let the community help you, to get where you want to go. Then you will have the tools to improve the learning of others. Pace yourself.


Thanks for the advice. The helping others that's through my questions then my answers.


Here is a solution to the problem.


My bad did that's not where I meant to post.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.