Back to Freecodecamp

Working With Text Lesson G

curriculum/challenges/english/blocks/top-working-with-text/637f4e8772c65bc8e73dfe2d.md

latest1.0 KB
Original Source

--description--

HTML comments are not visible to the browser; they allow us to comment on your code so that other developers or your future selves can read them and get some context about something that might not be clear in the code.

Writing an HTML comment is simple: You just enclose the comment with <!-- and -->tags. For example:

html
<h1> View the html to see the hidden comments </h1>

<!-- I am a html comment -->

<p>Some paragraph text</p>

<!-- I am another html comment -->

--assignment--

To get some practice working with text in HTML, create a plain blog article page which uses different headings, uses paragraphs, and has some text in the paragraphs bolded and italicized. You can use Lorem Ipsum to generate dummy text, in place of real text as you build your sites.

--questions--

--text--

How do you create HTML comments?

--answers--

/* This is an HTML comment */


<!-- This is an HTML comment -->


<-- This is an HTML comment --!>

--video-solution--

2