Friday, 8 April 2011

*Some More HTML Tags

Heading Tag
The Heading tag is a container tag used to specify the heading in web pages. A HTML document can have six different levels or sizes of heading - h1 to h6. A bigger suffix gives you a bigger sized heading.


Syntax
     <hn>   heading text   </hn>
    where n is the size of the text.


Example
                  
                <h1> What is Hacking ? </h1>
      <h2> What is Hacking ? </h>
       <h3> What is Hacking ? </h3> 
      <h4> What is Hacking ? </4>
       <h5> What is Hacking ? </h5> 
       <h6> What is Hacking ? </h6>
                        




                       Heading Tag                                  





Paragraph Tag <p>
The Paragraph tag is a container tag used to create paragraph in HTML document. It creates a line of space between two paragraphs.

Syntax

           <p>...............</p>


Example


                      <body>
                               <p>Hacking is authorized or unauthorized use of computer and network resources. hacking is the act of gaining access without legal authorization to a computer or computer network. etc.</p><p>There are five types of hackers.</p> 
                      </body> 


paragraph tag - Notepad

paragraph tag - Internet Explorer 


Line Break <br>
The Line break tag is an empty tag used to insert a line break. When we want to display the text in the next line, we insert a line break.

Syntax
         
         <body>
              text <br>
              text <br>
         </body>


Example

                   White Hat <br>

                   Black Hat <br>

                   Grey Hats <br>

                                               Script Kiddie <br>

                   Hacktivist <br>

                   Cyberterrorists <br>






Line Break Tag - Notepad


Line Break Tag - Internet Explorer



Horizontal Rule <hr>
The horizontal rule tag is an empty tag which is used to draw a horizontal line on the web page.


Syntax
             
                 <hr>

Example




                     <html>
                     <head>
                          <title> HACKING AND CYBER CRIME </title>
                     </head>
                     <body>
                      <h3> What is Hacking </3>
                      <hr>
                      <p>Hacking is authorized or unauthorized use of computer and network resources. hacking is the act of gaining access without legal authorization to a computer or computer network. </p><p>. There are six types of Hackers.</p>

         White Hat <br>

         Black Hat <br>

         Grey Hats <br>

         Script Kiddie <br>

         Hacktivist <br>

         Cyberterrorists <br>


                    </body>
                 </html>



Horizontal Rule Tag - Notepad




Horizontal Rule Tag - Internet Explorer


Preformatted text <pre>
The preformatted text tag allows ypu to retain the formate of the text entered in the editor.


Syntax
    
        <pre>
             text
       </pre>

Example


         <html>
            <head>
                <tiitle> Example of pre - formated paragraph </title>
            </head>
            <body>
                  <pre>
                               

                             White Hat                          Black Hat

                             Grey Hats                          

Script Kiddie

                             Hacktivist                           Cyberterrorists

                  </pre>
             </body>
          </html>



Preformatted Text - Notepad



Preformatted Text - Internet Explorer

Read More !

Thursday, 7 April 2011

*HTML TAGS

  All HTML pages are contained within the <html>and </html> tags. This tells the browser that the pages    have been formatted in HTML.


Syntax
    <html>


  •   
  •  
      contents of web page
  •      
  •  
    </html>

1. HEAD tag
The Head tag is a container tag which encloses the HEAD section of the HTML page. This section contains the introduction to the contents of the page.

Syntax
   <head>.......   </head> 

2. TITLE tag
Within the Head section we find the TITLE tag. This is a container tag which contains the document title. The title specified inside the TITLE tag appears in the browser's title bar. The TITLE tag can use only plain text. It does not accept any additional formatting.

Syntax
    <title>.......... </title>

Example
      
      <html>                                                                                                                                                            
                <head>                                                                                                                                          
            <title> HACKING AND CYBER CRIME </title>                                                                              
                 </head>                                                                                                                                         
             </html>                                                                                                                                                  

          

                                  Other then the contents enclosed within the TITLE tag all other contents of the HEAD section are not displayed in the browser.


3. BODY tag
The BODY tag appears just after the HEAD tag. It is a container tag which enclose all the text and image that make up the page. All the elements and formatting constraints of the web page are specified within the BODY of the HTML page.

Syntax
       <body>
            contents of web page
        </body>

Example

      <html>                                                                                                                                                                          
             <head>                                                                                                                                                      
                  <title> HACKING AND CYBER CRIME </title>                                                                            
              </head>                                                                                                                                             
               <body>                                                                                                                                            
           Hacking is authorized or unauthorized use of computer and network resources. hacking is the act of gaining access without legal authorization to a computer or computer network.                                                 
               </body>                                                                                                                                         
      </html>                                                                                                                                                          



View in Internet Explorer

                                                            HTML page in Notepad




Know More HTML Tags
Read More !

Wednesday, 6 April 2011

*HTML

What is HTML ?
HTML, which stands for 'Hyper Text Markup Language', is the predominant markup language for web pages. HTML is the basic building blocks of webpages.HTML is written in the form of HTML elements consisting of 'tags', enclosed in angle brackets (like <html>), within the web page content. HTML tags normally come in pairs like <h1> and </h1>. The first tag in a pair is the 'start tag', the second tag is the 'end tag' (they are also called 'opening tags' and closing' tags'). In between these tags programmers can add text, tables, images, etc.

HTML is a computer language devised to allow website creation. These websites can then be viewed by anyone else connected to the Internet. It is relatively easy to learn, with the basics being accessible to most people in one sitting; and quite powerful in what it allows you to create.

How does it work ?
HTML consists of a series of short codes typed into a text-file by the site author - these are the tags. The text is then saved as a html file, and viewed through a browser, like 'Internet Explorer' or 'Netscape Navigator' etc. This browser reads the file and translates the text into a visible form, hopefully rendering the page as the author had intended. Writing your own HTML entails using tags correctly to create your vision. You can use anything from a rudimentary text-editor to a powerful graphical editor to create HTML pages.

HTML is considered as a universal language to design web pages. It is machine independent, which means it can be used on all type of computer and can be read by all browsers. HTML involves no programing. It is a way of organizing the layout of a web page and defining the hyperlinks so that it can be displayed by a browser.

History of HTML
HTML was invented in 1999 by Tim Berners Lee, a scientist at CERN, Switzerland, at the European Laboratory for Particle Physics . The purpose was to make it easier for scientists of different universities to gain access to each other's research. Tim laid down the foundation of the World Wide Web.

Elements in HTML
A  HTML document is made op of text, headings, paragraphs, tables, horizontal lines, lists, etc. These are known as the elements of a HTML document.

Tags and Attributes
A HTML page also has elements called Tags and Attributes which are marks that are embedded in the text. These elements define the appearance of the page and decide how the page will appear in the browser. Browser are able to understand the formating specification given by the Tags and Attributes.

Tags in a HTML page
A tag consist of a left angle brackets (<) and a right angle brackets (>). The specification given to the browser are written within the brackets. There are two type of tags - Container tags and Empty tags.


1. Container tag
 Container tags are used  in  pairs and have a starting and ending tag. These tags define how the matter contained within them should be  formatted.  for example to make a line of  text bold we use the tags <b>.......</b>
      Tags are not case sensitive. so <b>........</b> is the same as <B>.......</B> but the correct way is to type them in lowercase.

2. Empty tags
Empty tags have only a tarting tag. Empty tags give formatting consisting construct like line breaks <br>, horizontal rule <hr>. etc.

Structure of a HTML document
The basic structure of any HTML document is

<html> 
   <head>
       <title> This is the title of the page </title>
   </head>
    <body>
This is where the contents of the page are to be written.
    </body>
</html>
Let us study the elements of a HTML document in detail.

How to Create a HTML document


Creating and Saving a HTML File
 To create a HTML document we need to open a text editor like Notepad or Wordpad.




  1. Click on Start  -->  Programs  -->  Accessories  -->  Notepad.
  2. Open a new page and type out the html code.
  3. Click File  -->  Save. In the Save dialog box save the file in the desired location with a name having an extension .htm or .html .



saving a HTML File

Viewing the HTML File
HTML pages can be viewed in a browser software. Here we shall use Internet Explorer.

  1. Click on the Internet Explorer icon
  2. In the address bar type the name of the HTML document giving the complete path i.e. where it is located. 
Viewing a HTML File

or

             Click the arrow key of the address bar to locate the file.

or

  1. Click File  -->  Open. The Open dialog box appears.
  2. Click the browser window to view the Microsoft Internet Explorer Window.
  3. Locate the file and click Open.
  4. In the Open window click OK.
Read More !