Sunday 15 October 2017

Any archive begins with a heading. You can utilize distinctive sizes for your headings. HTML additionally has six levels of headings, which utilize the components <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>. While showing any heading, program includes one line earlier and one line after that heading.

Case 

<!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>
Section Tag 

The <p> label offers an approach to structure your content into various sections. Each section of content ought to go in the middle of an opening <p> and an end </p> tag as appeared beneath in the illustration −

Illustration 

<!DOCTYPE html>
<html>

   <head>
      <title>Paragraph Example</title>
   </head>
 
   <body>
      <p>Here is a first paragraph of text.</p>
      <p>Here is a second paragraph of text.</p>
      <p>Here is a third paragraph of text.</p>
   </body>
 
</html>
Line Break Tag 

At whatever point you utilize the <br/> component, anything tailing it begins from the following line. This tag is a case of a vacant component, where you needn't bother with opening and shutting labels, as there is nothing to go in the middle of them.

The <br/> tag has a space between the characters br and the forward slice. On the off chance that you preclude this space, more seasoned programs will experience difficulty rendering the line break, while on the off chance that you miss the forward slice character and simply utilize <br> it isn't legitimate in XHTML.

Illustration 

<!DOCTYPE html>
<html>

   <head>
      <title>Line Break  Example</title>
   </head>
 
   <body>
      <p>Hello<br />
         You delivered your assignment ontime.<br />
         Thanks<br />
         Mahnaz</p>
   </body>
 
</html>

Focusing Content 

You can utilize <center> tag to put any substance in the focal point of the page or any table cell.

Case 

<!DOCTYPE html>
<html>

   <head>
      <title>Centring Content Example</title>
   </head>
 
   <body>
      <p>This text is not in the center.</p>
      
      <center>
         <p>This text is in the center.</p>
      </center>
   </body>
 
</html>

Level Lines 

Level lines are utilized to outwardly separation areas of an archive. The <hr> tag makes a line from the present position in the archive to the correct edge and breaks the line likewise.

For instance, you might need to give a line between two passages as in the given case beneath −

Illustration 

<!DOCTYPE html>
<html>

   <head>
      <title>Horizontal Line Example</title>
   </head>
 
   <body>
      <p>This is paragraph one and should be on top</p>
      <hr />
      <p>This is paragraph two and should be at bottom</p>
   </body>
 
</html>

Again <hr/> tag is a case of the void component, where you needn't bother with opening and shutting labels, as there is nothing to go in the middle of them.

The <hr/> component has a space between the characters hr and the forward slice. On the off chance that you preclude this space, more established programs will experience difficulty rendering the flat line, while on the off chance that you miss the forward cut character and simply utilize <hr> it isn't substantial in XHTML

Protect Formatting 

Here and there, you need your content to take after the correct arrangement of how it is composed in the HTML report. In these cases, you can utilize the preformatted tag <pre>.

Any content between the opening <pre> tag and the end </pre> tag will protect the organizing of the source report.

Illustration 

<!DOCTYPE html>
<html>

   <head>
      <title>Preserve Formatting Example</title>
   </head>
 
   <body>
      <pre>
         function testFunction( strText ){
            alert (strText)
         }
      </pre>
   </body>
 
</html>

Have a go at utilizing a similar code without keeping it inside <pre>...</pre> labels

Nonbreaking Spaces 

Assume you need to utilize the expression "12 Angry Men." Here, you would not need a program to part the "12, Angry" and "Men" crosswise over two lines −

A case of this strategy shows up in the film "12 Angry Men."

In cases, where you don't need the customer program to break content, you should utilize a nonbreaking space element &nbsp; rather than an ordinary space. For instance, when coding the "12 Angry Men" in a section, you should utilize something like the accompanying code −

Illustration 

<!DOCTYPE html>
<html>

   <head>
      <title>Preserve Formatting Example</title>
   </head>
 
   <body>
      <pre>
         function testFunction( strText ){
            alert (strText)
         }
      </pre>
   </body>
 
</html>

Translate

GoogleTech786. Powered by Blogger.

Subscribe Youtube

Our Facebook Page

Wikipedia

Search results

Popular Posts

Adsense