Course Content
HTML Forms
HTML forms are an essential part of web development and provide a way for users to input and submit data to a server. Forms allow users to enter data such as text, numbers, checkboxes, radio buttons, and more. When a user submits a form, the data is typically sent to a server for further processing.
0/6
HTML Graphics
HTML provides various ways to incorporate graphics into web pages.
0/2
HTML Media
HTML provides built-in support for embedding and displaying various types of media content on web pages.
0/5
HTML APIs
HTML APIs, also known as browser APIs or web APIs, are a set of interfaces and methods provided by web browsers to interact with and manipulate web content, access device features, and perform various tasks. These APIs are implemented in JavaScript and are accessible to web developers when creating web applications. Here are some commonly used HTML APIs:
0/5
HTML Examples
Creating a Simple Web Page, Adding Links and Images and more
0/4
HTML5 for Free | HTML5 – Unleashing the Potential of Web Development
About Lesson

HTML comments are used to add explanatory or informational notes within the HTML code that are not rendered or displayed in the browser. They are helpful for developers and designers to provide context, instructions, or reminders about the code.

HTML comments are denoted by the <!-- and --> delimiters. Anything placed between these delimiters is treated as a comment and is ignored by the browser when rendering the web page.

Here’s an example of how to use HTML comments:

<!-- This is a comment. It provides additional information or instructions. -->

<p>This is a paragraph of text.</p>

<!--
    <h2>This heading is commented out</h2>
    <p>This paragraph is also commented out.</p>
-->

<p>This is another paragraph of text.</p>

In the above example, the first comment will not be displayed on the rendered page, while the paragraphs will be visible. The commented-out code (heading and paragraph) will also be ignored and not rendered.

HTML comments are useful for various purposes, such as:

  • Documenting the purpose or functionality of a specific section of code.
  • Temporarily disabling or “commenting out” a portion of code for testing or debugging purposes.
  • Leaving notes or reminders for yourself or other developers who may work with the code in the future.

It’s important to note that HTML comments should not be used to hide content that should be visible to users, as they can be easily viewed by inspecting the page source. They should primarily serve as annotations and explanations for developers and not as a means of manipulating the appearance or behavior of the rendered page.

Join the conversation