comment box javascript code code example

Example 1: comment in javascript

// single line comment 

/* multiline comemnt 
line 2
line 3
line 4 */

Example 2: how to create a comment box in html and javascript

<style>
#wrapper{
  display:flex;
  flex-direction:column;
  width:fit-content;
  background-color: rgb(0,0,0,80%);
  padding:10px;
  color:whitesmoke;
  border-radius:5px;
}

#inner_div{
  margin-bottom:4px;
}

#comment-box{
  background-color: rgb(0,0,0,40%);
  border-radius:10px;
  resize:none;
  color:whitesmoke;
  padding:7px;
  outline:none;
}
</style>

<div id='wrapper'>
   <div id='inner_div'>Comment:</div>
   <textarea placeholder='Type here...' name="" id="comment-box" cols="30" rows="10"></textarea>
</div>

Tags:

Html Example