Saturday, 15 December 2012

HTML Tutorial

HTML Introduction

 

 

HTML is a language for describing web pages.

  • HTML stands for Hyper Text Markup Language
  • HTML is a markup language
  • A markup language is a set of markup tags
  • The tags describe document content
  • HTML documents contain HTML tags and plain text
  • HTML documents are also called web pages 

HTML Tags


  • HTML markup tags are usually called HTML tags
  • HTML tags are keywords (tag names) surrounded by angle brackets like <html>
  • HTML tags normally come in pairs like <b> and </b>
  • The first tag in a pair is the start tag, the second tag is the end tag
  • The end tag is written like the start tag, with a forward slash before the tag name
  • Start and end tags are also called opening tags and closing tags

HTML Elements

"HTML tags" and "HTML elements" are often used to describe the same thing.
But strictly speaking, an HTML element is everything between the start tag and the end tag, including the tags:
HTML Element:

HTML Page Structure

<html>
        <body>
                 <h1> This is Rajvinder singh Tutorial </h1>
                 <p> this is my paragraph </p>
                <div> this is rajvinder singh div tag paragraph </div> 

         </body> 
</html>


HTML Basic

 



HTML Headings

<h1>This is a heading</h1>
<h2>This is a heading</h2>
<h3>This is a heading</h3>
<h4>This is a heading</h4>
<h5>This is a heading</h5>
<h6>This is a heading</h6>

HTML Paragraphs

HTML paragraphs are defined with the <p> tag.
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>

HTML Links

HTML links are defined with the <a> tag.

<a href="http://www.w3schools.com">This is a link</a>  

HTML Images

HTML images are defined with the <img> tag.

<img src="w3schools.jpg" width="104" height="142">

 

HTML Elements

HTML documents are defined by HTML elements.

HTML Element Syntax

  • An HTML element starts with a start tag / opening tag
  • An HTML element ends with an end tag / closing tag
  • The element content is everything between the start and the end tag
  • Some HTML elements have empty content
  • Empty elements are closed in the start tag
  • Most HTML elements can have attributes

 

HTML Attributes

HTML Attributes

  • HTML elements can have attributes
  • Attributes provide additional information about an element
  • Attributes are always specified in the start tag
  • Attributes come in name/value pairs like: name="value"

Attribute Example

HTML links are defined with the <a> tag. The link address is specified in the href attribute:

Example

 <a href="http://www.w3schools.com">This is a link</a> 

 
 

 

 



No comments:

Post a Comment