Wednesday, October 21, 2015

How to Comment and uncomment Code in HTML & JAVASCRIPT & CSS?

Code:
<form>
  First name:<br>
  <input type="text" name="firstname">
  <br>
  Last name:<br>
  <input type="text" name="lastname">
</form>

Comment in HTML
<!--........................-->
<!--  <input type="text" name="lastname">-->

Comment In Javascript:
Single Line Comment:
 two slashes "//" in front of the code 
//document.write("Try this");
Mutliline Comment:
<script type="text/javascript">
<!--

/*document.write("try this!");

document.write("try this");*/
//-->

</script>

Comment Code in CSS

/*
.tblemp{
color:red;}

*/

No comments:

Post a Comment