No se como ijcvjxocojxdco

Cuéntanos qué está pasando:
Describe tu problema en detalle aquí.

no se como desconectar un comentario

Can you rephrase your question or provide some context? I can’t understand what you are asking.

si es necesario eliminar un comentario, entonces este es
<! —

I understand now, you are working on the challenge, “Descomenta código HTML”.

In the future, please provide a link. If you press the Obtener ayuda -> Solicitar ayuda, it will do it all for you.

Yes, comments are started with <!-- and ended with -->. If you want to “desomentar” them, you have to delete those. For example:

<h1>hola 1</h1>

<!--
<h1>hola 2</h1>
-->

<h1>hola 3</h1>

The middle one will not show up because it is commented out. To make it “active” again, we need to remove the comment tags:

<h1>hola 1</h1>

<h1>hola 2</h1>

<h1>hola 3</h1>

Now it will appear again.

Does that make sense?

In the challenge you have, everything is commented out. You must remove the comment tags so everything shows again.

Un comentario en html se ve como esto: <!--comentario-->

Texto en html descomentada se ve como esto: comentario

Es decir, un comentario esta envuelto en <!-- --> y el texto regular no tiene envolutra o esta envuelta en otros tags como <div></div> o <p></p>

Un comentario en html se ve como esto: <!--comentario-->

Yes.

Texto en html descomentada se ve como esto: comentario

Sure, I guess.

Es decir, un comentario esta envuelto en <!-- --> y el texto regular no tiene envolutra o esta envuelta en otros tags como <div></div> o <p></p>

I’m not sure you’re understanding. The comment tags are not a replacement for div tags or whatever.

A comment (in computer programming) is something that only the programmer will see. Sometimes you leave notes. This is from my first project on FCC:

<!-- Build project for fCC - tribute page -->

<html>
  <head>
    <title>Barney Kessel - Guitar Wizard</title>
  </head>
  <body>
    <div class="container-fluid myBody" id="main-window">
      
      <div id="title-area">
        <h1 class="text-center" id="title-line">Barney Kessel - Guitar Wizard</h1>

That text <!-- Build project for fCC - tribute page --> is only visible when you look at the computer program code - it odes not show up on the screen to the user. It is just there for my benefit. Sometimes I leave little reminders while I’m working like:

<!-- Don't forget to add the dark mode button here! ->

That is what comments are for - invisible text that tells the programmer something. Sometimes you leave a comment so you don’t forget why you did something a certain way or to tell future programmers.

It is also very common to comment out actual code, to keep it from being run/shown.

For example, if I had:

<h1>hola 1</h1>
<h1>hola 2</h1>
<h1>hola 3</h1>

and I wanted to see what it looked like without that middle line, or if I thought that code was causing a problem and I wanted to deal with that later, I could either deleted it:

<h1>hola 1</h1>
<h1>hola 3</h1>

or I could just comment it out:

<h1>hola 1</h1>
<!-- <h1>hola 2</h1> -->
<h1>hola 3</h1>

Commenting code out to test something is a very common thing that programmers do. From the perspective of the web page, the effect is the same - that line disappears.

So those are the two main uses of comments in code:

  1. To leave invisible notes in the code to help you or other programmers.
  2. To (temporarily) prevent code from being run/seen.

The example in the challenge involves the second one. The code is there but is surrounded by comment tags so it is not being run. You need to remove the comment tags so the code gets run.

1 Like

Gracias por las explicaciones !

3 Likes