0% found this document useful (0 votes)
5 views7 pages

HTML Comments: by Sri Sakthi.K 21CCU053 HTML

HTML comments are used to add notes within the code that are ignored by web browsers, serving as explanations for developers. They can be single-line or multi-line and are useful for debugging and communication among developers. CSS comments follow a similar format, allowing for both single-line and multi-line annotations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views7 pages

HTML Comments: by Sri Sakthi.K 21CCU053 HTML

HTML comments are used to add notes within the code that are ignored by web browsers, serving as explanations for developers. They can be single-line or multi-line and are useful for debugging and communication among developers. CSS comments follow a similar format, allowing for both single-line and multi-line annotations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

HTML COMMENTS

By
SRI SAKTHI.K
21CCU053
HTML
HTML COMMENTS TAG

 HTML comments add notes or annotations


within the HTML code. The web browser
ignores such code when it renders the
webpage. They are primarily intended for
developers and designers to provide
explanations, reminders, or instructions
within the code. HTML comments do not
appear on the webpage itself, but visitors can
view them when inspecting the source code.
ONE LINE IN HTML

 We can also comment on a single line in HTML. It is


also done in the same way as we comment on
multiple lines. In the following code, We will
comment second heading.
 Single-line comments: Single-line comments in PHP
start with // or # and continue until the end of the
line. They are used for adding short explanations or
notes on a single line.
 Comments are highly useful for debugging. When
working on a full-stack project, there are many
developers who work in different departments. Some
of them simultaneously work in more than one
department. They use comments to communicate.
We also use comments to define the purpose of
anything in HTML. They are valuable for those people
who do not understand HTML. For example, if a
person knows nothing about HTML, he would not
understand what does the following code does.
MULTILINE IN HTML

 We often write comments in HTML that


consist of more than one line. The comment
could be for documentation, debugging or
directions. We need to understand that how
can we comment a section in HTML
CSS COMMENT

Commenting in CSS is just the same as in PHP. We can use // for single
line comments or /* …. */ for multiline comments.

.myclass {
width: 100%;
//height: 100px;
background: blue;
}

 /* any other comment here */


THANKYOU

You might also like