0

WHAT IS HTML?
HTML provides a way of displaying Web pages with text and images or multimedia content. HTML is not a programming language, but a markup language. An HTML file is a text file containing small markup tags. The markup tags tell the Web browser, such as Mozila Firefox or Google Chrome, how to display the page. An HTML file must have an htm or html file extension. HTML stands for HyperText Markup Language.

HTML pages are of two types:

Static Pages - Static pages, as the name indicates, comprise static content (text or images). So you can only see the contents of a web page without being able to have any interaction with it.

Dynamic Pages - Dynamic pages are those where the content of the web page depend on user input. So interaction with the user is required in order to display the web page. For example, consider a web page which requires a number to be entered from the user in order to find out if it is even or odd. When the user enters the number and clicks on the appropriate button, the number is sent to the web server, which in turn returns the result to the user in an HTML page.


Tags and Elements
A tag is a bit of text that acts as a point demarcation. To create a tag, HTML gives certain characters special meaning: the angle brackets < and >.
            Putting characters within angle brackets creates a tag.


There are two tags: Start tag or opening tag and end tag or closing tag. An end tag always matches a start tag, except that it has an extra forward slash after the opening angle bracket.

The combination of a start and end tags define an element. Everything between the two tags is referred to as the contents of the element.


Attribute
Attributes provide additional information about the contents of an element. They appear on the opening tag of the element and are made up of two parts: - a name and a value, separated by an equals sign.


The attribute name indicates what kind of extra information you are supplying about the element's content. It should be written in lowercase.

The value is the information or setting for the attribute. It should be placed in double quotes. Different attributes can have different values.

In this example an attribute called lang is used to indicate the language used in this element. The value of this attribute on this page specifies it is in US English.

Note: - HTML5 allows you to use uppercase attribute names and omit the quote marks, but this is not recommended.

HTML Tag - <HTML> is a starting tag. To delimit the text inside, add a closing tag by adding a forward slash “/” to the starting tag. Most but not all tags have a closing tag. It is necessary to write the code for an HTML page between <HTML> and </HTML>. This <HTML> tells the browser is 'this is the start of an HTML document' and </HTML> 'this is the end of an HTML document'.

<html>
...........................
...............................
.........................

</html>

Head Tag - Before the <body> element you will often see a <head> element. This contains information about the page, rather than information that is shown within the main part of the browser. You will usually find a <title> element inside the <head> element. <head> is opening head tag and </head> is closing head tag.

<html>
            <head>
                        <title> Hello </title>
            </head>
</html>


Title Tag: - The contents of the <title> element are either shown in the top of the browser, above where you usually type in the URL of the page you want to visit, or on the tab for that page (if your browser uses tabs to allow you to view multiple pages at the same time). <title> is opening title tag and </title> closing title tag.

<html>
            <head>
                        <title> Hello </title>
            </head>
</html>

 Output


Body Tag: - Everything inside this element is shown inside the main browser window.  <body> is opening body tag and </body> is closing tag.

<html>
            <head>
                        <title> Hello </title>
            </head>
        <body>
                        <h1> Body of Page </h1>
        </body>
</html>


 Output

How to Create a Web Page
1. Open Notepad or any text editor
2. Write HTML Code

3. Save with .html extension i.e. hello.html

4. Done
(Click image for large view)





Like it ? Share it.

Post a Comment

Comment Rules :
1. Do not post Adult/illegal Links.
2. Try to comment in only English Language.
3. Do not post other website's links which are useless.
4. Your Comment should be based on the Topic for other queries Kindly Visit our Contact Us Page.
5. Do not use Abusive Language.
6. Respect each other.
Thank You for following the rules. Please Comment....

 
Top