Thursday, July 19, 2012

Lesson 1: HTML Tutorial

Welcome to 123 School's HTML Tutorial. Here you will learn the basics of Hyper Text Markup Language (HTML), so that you may design your own web pages. If you already know XML, HTML will be a snap for you to learn. We urge you not to attempt to blow through this tutorial in one sitting. Instead, we recommend that you spend 15 minutes to an hour a day practicing HTML and then take a break to let the information settle in. We aren't going anywhere!

What is HTML?

HTML stands for Hyper Text Markup Language. It is not a programming language, but rather a markup language for displaying web pages and other information that can be displayed in a web browser.


Words to Know


Throughout this tutorial, we will be using several terms that are unique to HTML. It is important for you to understand what these words mean, in the context of HTML.

Tag :- Used to tag or "mark-up" pieces of text. Once tagged, the text becomes HTML code to be interpreted by a web browser. Two type of tags in html one is opening tag another one is closing tag.<p> is the example of opening tag and </p> is its closing tag.

Element :- Element is a complete tag, having an opening <tag> and a closing </tag>

Attribute :- Used to modify the value of the HTML element. Elements will often have multiple attributes.

For now, just understand that a tag a piece of code that acts as a label that a web browser interprets, an element is a complete tag with an opening and closing tag, and an attribute is a property value that customizes or modifies an HTML element.

Example :- 

HTML files are nothing more than simple text files, so to start writing in HTML, you need only a text editor.

  1. Open a text editor (Notepad is a common text editor for Windows users, Gedit for Linux users.)
  2. Type the following line in to the text editor.
  3. Save this file as "myweb.html" (you can type any name but you must save that file name extention ".html")
    eg:- home.html, index.html, john.html, etc.
  4. Open that file (myweb.html) in a web browser (Mozilla firefox, Internet Explorer, Opera, Safari, etc)
  5. You get like this out put

    In this example:-

    Tags

    Opening Tags                               <html>,   <head>,   <title>,  <body>,  <h1>,  <h2>,  <p>,  <a>
    Closing Tags</html>, </head>, </title>, </body>, </h1>, </h2>, </p>, </a>

    Elements

    html Element<html>
         <head>
              <title>My Web Page!</title>
         </head>
         <body>
                <h1 align="center">Heading</h1>
                <h2>Sub heading</h2>
                <p>Avoid losing floppy disks with important school...</p>
         </body>
    </html>
    head Element<head>
         <title>My Web Page!</title>
    </head>
    body Element <body>
         <h1 align="center">Heading</h1>
         <h2>Sub heading</h2>
         <p>Avoid losing floppy disks with important school...</p>
    </body>
    P Element    <p>Avoid losing floppy disks with important school...</p>
    Another p Element           <p><a href="http://123schools.blogspot.in">Click here </a> for more details</p>
    h1 Element<h1 align="center">Heading</h1>
    h2 Element <h2>Sub heading</h2>
    a Element <a href="http://123schools.blogspot.in">Click here </a>

    Attributes

    align Attribute                                               align="center"                                                    
    href Attributehref="http://123schools.blogspot.in"

      Note : Attribute is not working without Element



    Note : - Don't worry if the examples use tags you have not learned. You will learn about them in the next chapters.

    HTML Tutorial                                                    Next Lesson >>

1 comment: