Sunday 16 November 2014

What is HTML?

HTML is a most commonly used language for designing websites. Today HTML language is being taught at young age onwards. This language is user-friendly and efficient to use. It is very interesting and easy to learn.

HTML stands for Hyper Text Markup Language.

HTML language consist of a set of rules as to govern how the website looks. These set of rules is called as Tags. An HTML tag is used to format and describes the content of the document in HTML. HTML language is a collection of tags and contents.

HTML language is a subset of Standard Generalized Markup Language (SGML) and is maintained and specified by the World Wide Web Consortium (W3C).

HTML Tags

HTML tags are instructions that are embedded directly into the text of an HTML document. HTML tags are contained inside a pair of angle brackets. For example: <html>. HTML tags are keywords that point out a specific function to perform in HTML language. For example: html tag (<html>) specifies that the document we are writing is an HTML code. image tag (<img />) specifies the image location and hyprlink (<a href="https://www.blogger.com/null">) specifies the desired location in an HTML document.

There are two types of tags
  1. Container Tags
  2. Empty Tags
Container Tags
HTML container tags are specified in pairs, delimiting text that will have some type of formatting like and . The first tag is called the opening tag and the second tag is called the closing tag. The ending tag is written like the starting tag but contains a forward slash (/) before the tag name.

Empty Tags 
HTML empty tag is a single tag, representing some formatting command in HTML. For example: <br >

HTML Elements

HTML document are defined by HTML elements. HTML elements contains everything from the opening tag to the closing tag. It includes the tagname and also the content between them. Some of the HTML elements have empty contents and these elements are closed in the opening tag itself.

HTML Attributes

HTML attributes are used to provide additional information about HTML elements. They are very useful in coding a webpage.

Attributes are always specified in the opening tag. Attributes are defined to the tagname and come in name/value pairs like name="value". Attributes values should always be enclosed in double quotes.

Attribute names and attribute values are case-sensitive that is they can be coded in uppercase character or lowercase character. However, the World Wide Web Consortium (W3C) recommends lowercase attributes/attribute values in HTML.

Writing an HTML code

HTML code is easy to learn and fun to write. We don't have to buy software for writing an HTML code. Simple text editors like Notepad (PC) and TextEdit (Mac) can be used to write a HTML code.

  1. To write a HTML code, first open Notepad,
    To open Notepad go to: Start - Programs - Accessories - Notepad.
  2. Type a HTML code in Notepad.
    <html>
    <head>
    header files goes here....
    </head>
    <body>
    body files goes here....
    </body>
    </html>
    
  3. Next save your HTML code as html file. For that, click File - Save as. When you save your document save it with .htm or .html extension.
  4. After you save your HTML file, open it in any web browser available in your computer. The resulted design you see is the HTML code translated into web pages.

0 comments:

Post a Comment