HTML Tutorial

html basic

1.1 HTML Home

Everyone wants to make his own website. If you make it own then then won't it amazing?

So I am now going to tell you how to make a web site.
1-First of all you have to learn HTML.
2-You can make a simple web page using this.
3-You can also make a dynamic view by using other languages like html5, java script, java query, php, css and more. We will discuss about this later.
4-HTML stands for Hyper Text Markup Language.

  In the next you will learn to make a web page code by HTML language.

1.2 HTML Introduction

What is HTML?

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

<tagname>content</tagname>

The basic FORMAT

<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>

Example Explained
The DOCTYPE declaration defines the document type
The text between <html> and </html> describes the web page
The text between <body> and </body> is the visible page content
The text between <h1> and </h1> is displayed as a heading
The text between <p> and </p> is displayed as a paragraph

How to open test your web page ?
To know click http://lapoview.blogspot.in/2013/12/how-to-make-html-page-without-internet.html

1.3 HTM Basic

Don't worry about the tags you have not learnt, we will discuss these about later.
Basically to create a HTML web page your coding should lie in between the html tag.
(<html>...........</html>)
Next after the <html> tag use <head> tag. This tag is useful when you want to use a block of coding or something through out the entire coding. The codes in between this tag is known as the global tag and can be used through out the entire coding.
But if you declare some code in between the body that can only be used in single code you want to. This is called local coding.

Normally the WEB code looks like

<!DOCTYPE html>
<html>
<head>
:
:
</head>
<body>
<p>............</p>
<br>
<h1>..........</h1>
:
:
:
</body>
</html>

The head is the styling part or the declaration part of the coding. You can make a design without using this tag. Many tags like <title> tag , <style> tag lies in head tag.
Where as in <body> tag we use all things for our code and is known as the real part of the web page coding.

NOTE: Always use end tag of a tag (</tagname> is end tag and <tagname> is beginig tag ). Where as the browser take this code and can make output. But the future version of HTML is strictly forbid this and this may cause bugs in the codding.

1.3 HTML Elements

An HTML element is every thing from the start tag to end tag.
* The start tag is often called the opening tag. The end tag is often called the closing tag.
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

Tip: You will learn about attributes in the next chapter of this tutorial.

Nested HTML Elements
Most HTML elements can be nested (can contain other HTML elements).
HTML documents consist of nested HTML elements.

HTML elements with no content are called empty elements.
<br> is an empty element without a closing tag (the <br> tag defines a line break).
Tip: In XHTML, all elements must be closed. Adding a slash inside the start tag, like <br />, is the proper way of closing empty elements in XHTML (and XML).

HTML Tip: Use Lowercase Tags
HTML tags are not case sensitive: <P> means the same as <p>. Many web sites use uppercase HTML tags.
W3Schools use lowercase tags because the World Wide Web Consortium (W3C) recommends lowercase in HTML 4, anddemands lowercase tags in XHTML.

1.4 HTML Attributes

Attributes provide additional information about HTML elements.
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:
<a href="http://www.lapoview.blogspot.com.com">This is a link</a>

Always Quote Attribute Values
Attribute values should always be enclosed in quotes.
Double style quotes are the most common, but single style quotes are also allowed.

Tip: In some rare situations, when the attribute value itself contains quotes, it is necessary to use single quotes: name='John "ShotGun" Nelson

Now we will start learning some tag examples

1.5 HTML Heading

Headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important heading.
Example:
<!DOCTYPE html>
<html>
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body>
</html>
Note: Browsers automatically add some empty space (a margin) before and after each heading.
Headings Are Important
Use HTML headings for headings only. Don't use headings to make text BIG or bold.
Search engines use your headings to index the structure and content of your web pages.
Since users may skim your pages by its headings, it is important to use headings to show the document structure.
h1 headings should be used as main headings, followed by h2 headings, then the less important h3 headings, and so on.

1.6 HTML Lines

The <hr> tag creates a horizontal line in an HTML page.
The hr element can be used to separate content:
example:
<!DOCTYPE html>
<html>
<body>
<p>The hr tag defines a horizontal rule:</p>
<hr>
<p>This is a paragraph.</p>
<hr>
<p>This is a paragraph.</p>
<hr>
<p>This is a paragraph.</p>
</body>
</html>

1.7 HTML Comments

Comments can be inserted into the HTML code to make it more readable and understandable. Comments are ignored by the browser and are not displayed.
Comments are written like this:
Example:
<!DOCTYPE html>
<html>
<body>
<!--This comment will not be displayed-->
<p>This is a regular paragraph</p>
</body>
</html>
Note: There is an exclamation point after the opening bracket, but not before the closing bracket.

1.8 HTML Paragraphs

Paragraphs are defined with the <p> tag.
Example:
<!DOCTYPE html>
<html>
<body>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body>
</html>

1.9 HTML Line Breaks

Use the <br> tag if you want a line break (a new line) without starting a new paragraph:
Example:
<!DOCTYPE html>
<html>
<body>
<p>This is<br>a para<br>graph with line breaks</p>
</body>
</html>

The <br> element is an empty HTML element. It has no end tag.
FOR FURTHER PLEASE VISIT MY NEW REDEFINED BLOG WEBCORE9.BLOGSPOT.COM


No comments:

Post a Comment