HOME | PHP Tutorial | CSS
facebook icon
AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP
HTML Tutorial

CSS Tutorial

HTML comment one line and multiple lines - how to create comment in HTML

HTML comment one line and multiple lines is a piece of code which is ignored by any web browser. You can add comment text into your HTML code, especially in complex documents, to give some explanations to the html document. Comments help you and others to understand your code.

Example of HTML comment text one line and multiple lines

Any content in HTML is placed between <!-- ... --> tags, where this text will be treated as comment and will be ignored by any browser.

Example 1:
<!DOCTYPE html>
<html>
<head>
<title>Title of button action</title>
</head>
<body>

<a href="http://www.agernic.com" target="_blank" style="color:#C30; text-decoration: none;">Tutorial html</a>
<!-- Here put your comment about your HTML cod -->

<a href="http://agernic.com/facebook.jpg" target="_blank"><img src="http://agernic.com/facebook.jpg" style="width:342px;height:72px;border:0;" alt="facebook"></a>
<!-- Some details about the html code.
This is a multiline comment,
and it can span through
as many as lines you like.
Here put your comment about your HTML cod -->


<a href="https://www.google.com/" target="_blank" style="text-decoration: none; padding:8px; color:#090; font-size:18px">Google Search</a>

</body>
</html>

The html cod above will display this HTML result without comment text:

Tutorial html
facebook
Google Search
Note: As I said Comments are not displayed by the browser, but this can help you with source code.

HTML comment one line, html comments multiple lines, html comment text, box HTML comment one line and multiple lines - html tutorial

1928. Home HTML Tutorial, html tutorial
Home HTML Tutorial html tutorial
http://www.agernic.com/html-tutorial/home-html-tutorial.html

2659. Images : Alternative Text - HTML Tutorial
HTML images - HTML tutorial
http://www.echoecho.com/htmlimages05.htm

2185. HTML Tutorial - Code-Format, Computer-Code-Tag
Wie man mit dem Computer formatiertem Code schreibt. Einfaches und praktisches Besipiel zum HTML-Code-Tag
https://tutorialehtml.com/de/html-computercode/

2320. HTML Tutorial - <body> tag. Web page content
La balise body, en alignant le contenu d
https://tutorialehtml.com/fr/html-balise-lt-body-gt/

2669. Links : Image Links - HTML Tutorial
HTML links - HTML tutorial
http://www.echoecho.com/htmllinks06.htm

2617. Basics : Page Structure - HTML Tutorial
HTML basics - HTML tutorial
http://www.echoecho.com/htmlbasics03.htm

Your add here
How to get PHP errors to display?
How to prevent sql injection in php mysqli
How do I get PHP errors to display - PHP error_reporting()
mysql_query(): The mysql extension is deprecated and will be removed i
Function eregi_replace() is deprecated in php - How to fix
PHP delete an element from an array
Uncaught Error: Call to undefined function MYSQL_NUM_ROWS() in
Deprecated: mysql_connect() mysql extension is deprecated and will be
mysqli_fetch_array() expects parameter 1 to be mysqli_result boolean g
SQL IN Operator - example
SQL BETWEEN Operator
SQL like syntax and example
SQL WHERE AND & OR multiple conditions
SQL create table primary key autoincrement
PHP mysqli_connect () Function
SQL COUNT(), AVG() and SUM() Functions
Display data from SQL database with MySQLi into php - html table
SQL CREATE DATABASE - example
SQL mysql order by columns, by date, by asc, by desc, random with PHP
PHP mysqli_query() Function - mysqli query
SQL delete row - SQL delete table
SQL update - SQL update select
Insert into SQL - Insert into table SQL - Insert data in sql
Login in PHP - simple login script with PHP MYSQL