|
|
HTML(Hyper Text Markup Language) Document Basic.
HTML Document has two distinct parts. [head, body].
Head is the HTML Document where you mentioned mainly the Title, include, scripts, and links.
Body is where the entire content of the concept is put. Like Animation, Graphics, Links, Text e.t.c
Both Head,Body are enclosed with in <HTML> tag.
Example 001
basic Structure of HTML Document.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Title of the HTML Document</title>
<meta name="GENERATOR" content="Quanta Plus">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
Animation, Graphics, Links, Text e.t.c
</body>
</html>
Now to have hands on experience on developing HTML Document open any text editors (any text editor excludes document editors like M.S. Word, Open Office Writer etc) then type the code in Example 002
Example 002.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Hello World</title>
</head>
<body>
<h1>Hello World !</h1>
</body>
</html>
Now save the Example 002 content as helloworld.html. Now open helloworld.html in a browser.
(You will see your first HTML Document opened in a browser(Internet Explorer or Firefox))
Basics of HTML Tags.
1.All container tags are enclosed with < and >
2.to open tags we use only < and >
3.to close tags we use < / and >
In HTML, tags that include both open and closing tags are called container tags.
Container tags wrap around content in a HTML Document. To give the preferred output.
Example 003
<tag>content which is modified using specific content in the tag </tag>
Empty tag.
These tags have an opening tag but no closing tag. Since empty tags do not act on the content. But they can be used to add Break line Example <BR>. To add Horizontal Rule Example <HR> (draws a line across the width of HTML Document)
Paragraph text. <P></P>
All the text and content (like images) has to be added in between <body></body> body opening and closing tags.
<P> Paragraph Tag is used to inform the browser that paragraph is starting at <P> and ends at </P>
Break Line <BR>
The Empty tag <BR> which forces a line return in HTML Document.
Comment tag <! comment with multiple line >
Headings <H1></H1> to <H6></H6>
H1 tag being the first heading and H6 being last.
Bold Text: <B></B>
Italic Text: <I></I>
Underlined Text: <U></U>
Emphasis text: <EM></EM>
Strong Emphasis Text: <STRONG></STRONG>
TeleType Text: <TT></TT>
|