HTML Comments

 

  • it is used to understand the code written by someone.
  • the browser will ignore the comments 

Types of Comments in HTML

Single-line Comments

  • Single-line comments are contained within one line. 

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

Multi-line Comments

  • Multi-line comments span across multiple lines, making them ideal for detailed explanations or temporarily disabling blocks of code.

<!-- 
  This is a multi-line comment.
  It spans multiple lines.
  -->



Related Posts:

  • Video & Audio Tags<video> TagThe <video> HTML element embeds a media player that supports video playback into the document.The <video> tag create… Read More
  • iFrames in HTMLWhat is an iFrame?An iFrame is an HTML element that enables an inline frame for the embedding of external content. Essentially, you can load another w… Read More
  • SVG in HTML What is SVG?SVG stands for Scalable Vector Graphics. Unlike raster images like PNGs or JPGs, SVGs are not pixel-based. They're composed of vector… Read More
  • Textarea & Select Textarea ElementThe textarea element is used when you need multiline text input from the user. This is particularly useful for comment… Read More
  • Link & Script TagsThe <link> and <script> tags are essential elements within an HTML document's <head> section. The… Read More

0 Comments:

Post a Comment

Do leave your comments