Introduction
to HTML
HTML stands for Hyper Text Markup
Language, which is the most widely used language on Web to develop web pages.
HTML was created by Berners-Lee in late 1991 but "HTML 2.0" was the first standard HTML specification which was published in 1995. HTML 4.01 was a major version of HTML and it was published in late 1999. Though HTML 4.01 version is widely used but currently we are having HTML-5 version which is an extension to HTML 4.01, and this version was published in 2012
what is html ?
html stands for Hyper Text Markup Language, which is the most widely used language on Web to develop web pages.
html basic
As told earlier, HTML is a markup language and makes use of various tags to format the content.
These tags are enclosed within angle braces <Tag Name>.
Except few tags, most of the tags have their corresponding closing tags.
For example <html> has its closing tag </html> and <body> tag has its closing tag </body> tag etc.
There are two other terms which are element and attribute
some of the common tag used in html document are as follow
1) <!doctype....>
this tag defines the document type and html version
2) <html>
this tag enclose the complete html document and mainy compries of documnent header which is represented by<head>.....<//head> and document body which is represented <body>...</body> tag
3)<head>
4)<title>
the title tag is used inside the <head> tag to mention the document title.
5)<body>
This tag represents the document's body which keeps other HTML tags like <h1>, <div>, <p> etc
6) <h1>
This tag represents the heading.
7) <p>
the tag represents a paragraph
To learn HTML you will need to study various tags and understand how they behave while formatting a textual document learning HTML is users have to learn the useg of different tage in order to format the text or image to make a beautiful webpage
1) <p>
This is a paragraph content
2) <h1>
This is heading content
3) <div>
This is division content
So here <p>....<p> is an HTML elements <h1>....</h1> is another html element there are some html element which don't need be close such <img..../><hr> and <br/> element thede are known as void element
HTML document consist of a these of elements and they specify how html document should be built and what kind of should be paid part html document
1) The I'd attribute
The I'd attribute of an HTML tag can be used to unique identifier any element within an HTML page there are two primary reason thet you might want to use an I'd attribute element
Example
<P I'd="html "> this para explanis what is html <p>
<P I'd ="css">this para explanis what is cascading style sheet </p>
2) This title attribute
The title attribute gives a suggested title for the element they syntax for the title attribute is similar as explained for I'd attribute
Example
<HTML>
<Head>
<Title>the title attribute example</title>
</Head>
<Body>
<H3 title ="hello html!"> Titled heading tag example</H3>
<Body>
</HTML>
3) the class attribute
The class attribute is used to associate an element with a style sheet and specifices the class of elements you will learn more about the user of th use class attribute when you will learn cascading style sheet css for now you can avoid it
Class ="class name 1 class name 2 class name3"
4) the style attribute
The style attribute allow you to specify carsecading style sheet css rules within the element
<HTML>
<Head>
<Title> the style attribute <\title>
</head>
<body>
<p style ="front-family:arial;#ff0000;">some text ....<\p>
</Body>
<\html>
Internationalization attribute
1) the dir attribute
The dir attribute allow you to indicate to the browser the direction in which the text should flow the dir attribute can take one of two value
1) Value :- ltr
Meaning:- left to right default value
2) value:- RTL
Meaning:- right to left for language such as Hebrew or arabic that are read right to left
Example
<HTML dir="RTL">
<Head><title>display direction </title></head>
<Body>
This is how ie 5 renders right -to-left directet text.
</Body>
</HTML>
2) the lang attribute
The lang attribute allos you to indicate the main language used in a document this attribute has been replaced by the XML:lang attribute in new XHTML document
HTML language code:iOS 639 for a complete list of language codes
Example
<HTML lang ="en">
<Head>
<Title>English language page</title>
</Head>
<Body>
This page is used English language
</Body>
</HTML>
3) the XML:lang attribute
The XML:lang attribute is the XHTMl replacement for the lang attribute
Generlc attribute
1) Attribute:- align
Options:- right, left, bottom
Function:- horizontally alings tag
2). Attribute:- valign
Options:- top, middle, bottom
Function:- vertically aligns within html element
3). Attribute :- bgcolor
Options:- numeric, hexadecimal,RGB values
Function :- place a background colour behind an element
4) attribute:- background
Options:- url
Function:- place a background image behind an element
5) attribute :- I'd
Options:- user defined
Function:- names an element for use with cascading style sheets
6) attribute :- class
Options:- user defined
Function:- classified an element for use with cascading style sheets
7) attribute :- width
Options :- numberic value
Function :- specific the width of table image or table cells
8) attribute:- height
Options:- numberic value
Function :- specifies the height of tables image or table cells
9) attribute:- title
Options:- user defined
Function:- "pop-up" of the element
0 Comments