Basic Html Tags

Heading Tags

You can use different sizes of headings in your document. HTML also has six levels of headings, which use the elements <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>. While displaying any heading, browser adds one line before and one line after that heading.
Example
<!DOCTYPE html>
<html>
<head>
<title>Heading Example</title>
</head>
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body>
</html>


Paragraph Tag

<p> this tag use for paragraphs. Each paragraph of text should written in between opening <p> and a closing </p> tag as shown below.
Example
<!DOCTYPE html>
<html>
<head>
<title>Paragraph Example</title>
</head>
<body>
<p> A first paragraph.</p>
<p> A second paragraph.</p>
<p> A third paragraph.</p>
</body>
</html>

Line Break Tag

when you want to break the line in Html coding you can use this tag <br />  where you want to break the line.
Example
<!DOCTYPE html>
<html>
<head>
<title>Line Break  Example</title>
</head>
<body>
<p>Hello<br />
how are you<br />
I am fine<br />
how about you</p>
</body>
</html>

Centering Content

You can use <center> tag to put any content in the center of the page
Example
<!DOCTYPE html>
<html>
<head>
<title>Centring Content Example</title>
</head>
<body>
<p>without use center teg.</p>
<center>
<p>with center teg.</p>
</center>
</body>
</html>

Links

links are important for user to move one page to an other page 
                          <a href="home.html"> 
this line use to link the page
Example
<html>
 <head>
  <title>this is the title</title>
 </head>
 <body>
  <p>A link: h1><a href="http://www.asktocoders.blogspot.com"> html guide <h1/></a></p>
 </body>
</html>

Images

Adding your photos in web pages <img src="photo.jpg"> use this tage
Example
<html>
 <head>
  <title>this is the title</title>
 </head>
 <body>

  <p>An image: <img src="photo.jpg"> </p>

 </body>
</html>

No comments:

Post a Comment