Basic Elements - Learn HTML - Free Interactive HTML Tutorial

Image
Basic Elements The use of basic HTML Tags.. Coding.... <!DOCTYPE html> <html> <head> <title>Example page</title> </head> <body> <h1>Heading 1</h1> <h2>Heading 1</h2> <h3>Heading 1</h3> <h4>Heading 1</h4> <h5>Heading 1</h5> <h6>Heading 1</h6> <p>This is peragraph.</p> <p>Horizontal Line Below</p> <hr /> </body> </html> Output Of Above Code... Output

HTML comment Tag

What is Comments?

Use of comments tags in html codes. Comments are use to describe about code that is write for page.This text ignored by web browser and can not displayed in output screen.You can use comments to explain your code, which can help you when you edit the source code at a later date. This is especially useful if you have a lot of code.

How Add HTML comments in page...

Coding

<HTML>
<Head><Title>Example of Comment</Title></Head>
<Body bgcolor=green>

<!--This is a comment. Comments are not displayed in the browser-->

<p>This is a paragraph.</p>
</body>
</HTML>

Tips and Notes

You can also use the comment tag to "hide" scripts from browsers without support for scripts (so they don't show them as plain text):

Coding

<script type="text/javascript">
<!--
function displayMsg() {
  alert("Hello World!")
}
//-->
</script> 

Comments

Popular posts from this blog

HTML Character Sets

HTML Declaration