Posts

Showing posts with the label browser rendering

Using HTML Comments

Image
HTML comments are incredibly useful for web developers to add notes to their code or to deactivate certain portions of code. HTML comments are ignored by browsers, meaning the content within comments isn't visible to the end user visiting the webpage. Structure of HTML Comments HTML comments are written between <!-- and -->. Here's an example: <!-- This is a comment --> <p>This is a paragraph.</p> <!-- Remember to add more information here --> output: This is a paragraph. As you can see from the example above, HTML comments aren't visible to the end user viewing the webpage, but are available in the code for developers to read. This makes comments a great tool for leaving notes or reminders in your HTML. Uses of HTML Comments 1. Adding Notes HTML comments are often used to add notes to the code. This is particularly helpfu...