HTML (Hyper Text Markup Language)
It is used to design and develop Web Pages. The first version of HTML was
written by Tim Berners-Lee in 1993. HTML is derived from Standard
Generalized Markup Language (SGML). SGML is a language used to define
other languages.
HTML5 is the latest version of HTML.
HTML is made up of element or Tags and attributes, which work together to
identify document parts and tell browsers how to display them.
All HTML tags are contained with the angle brackets(<>) e.g., <HTML> is a
tag.HTML tags are not case sensitive, <body> means the same as <BODY>
The HTML instructions are called tags, and look like
– <TAG> ….. Text here…….. </TAG>
Container tags :Tags that have starting as well as ending part.
– e.g.: <TITLE>Title of the Web Page </TITLE>
Empty tags : Tags that do not have the closing part.
– e.g. <BR> , <HR>
(HTML instructions + text to which the instructions apply)= HTML elements
An attribute is an additional feature you can use to configure the element
Structure of HTML Document
<HTML>
<HEAD> <!-- Head Section -->
<TITLE>Title of the Web Page </TITLE>
</HEAD>
<BODY> <!-- Body Section -->
<!-- Contents on Web Page -->
<H1> Contents </H1>
</BODY>
</HTML>
An HTML file can be created by using a simple text editor viz notepad, textpad,
editplus.
HTML file must have an extension htm or html.
,Every HTML program or document has a rigid structure. The entire web page
is enclosed within the <HTML> </HTML> tag. Within this tag, two distinct
sections,head and body are created. These sections are as described below.
Document Head
The text between the <HEAD> tag and the </HEAD> tag is header
information.Header information is not displayed in the browser window, it is
necessary for the internal working of the document. An exception to this is
the <TITLE> </TITLE> tag, which displays the document title in the browser’s
title bar.
Document Body
The <BODY></BODY> tag encloses the body of the HTML document.
Comments
The <!-- --> tag is used to insert a comment in the HTML source code. A
comment will be ignored by the browser. Comments can be used to explain
your code or earmark the areas that need improvement, which can help you
when you edit the source code at a later date.
e.g.: <!-- This is a comment -->
Note that you need an exclamation point after the opening bracket, but not
before the closing bracket.
Physical text formatting tags
Tag Description
<B>….</B> - Bold
<I>……</I> - Italic
<U>….</U> - Underline
<STRIKE>…</STRIKE> - Strikethrough
<TT>….</TT> - Typewriter (monospaced)
<CENTER></CENTER> - Centers the text on the screen.
<SUB>….</SUB> - Subscript
<SUP>….</SUP> - Superscript
<BIG>….</BIG> - Bigger font (one font size bigger)
<SMALL>….</SMALL> - Small font (one font size smaller)
The following example shows the basic use of the physical text formatting
tags:
<HTML>
<HEAD>
<TITLE> Physical tags </TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF“ TEXT =“red”>
<H1 ALIGN ="center"> Physical tags </H1>
<HR>
This is <B> bold </B> <BR>
This is <I> Italic </I> <BR>
This is <U> underline</U> <BR>
, This is <TT> Monospaced</TT> <BR>
This is <STRIKE> Strike-through</STRIKE> <BR>
This is <S>Strike-through</S> <BR>
This is <BIG> Big</BIG> <BR>
This is even<BIG><BIG> Bigger </BIG></BIG> <BR>
This is <SMALL> small</SMALL> <BR>
This is even<SMALL><SMALL> smaller</SMALL></SMALL> <BR>
This is <SUP> superscript</SUP> <BR>
This is <SUB> subscript</SUB> <BR>
</BODY>
</HTML>
Output:
Text Formatting tags
Header Tags
– HTML has six level of headings.
– Displayed in larger and bolder fonts.
– Different level heading tags
• <H1> Heading 1 </H1>
• <H2> Heading 2 </H2>
• <H3> Heading 3 </H3>
• <H4> Heading 4 </H4>
• <H5> Heading 5 </H5>
• <H6> Heading 6 </H6>
The font size of the heading will go on decreasing from H1 to H6.
Headings
HTML has six levels of headings, numbered 1 through 6, with 1 being the
largest. Headings are typically displayed in larger and/or bolder fonts than
normal body text. The first heading in each document should be tagged <H1>.
The syntax of the heading element is: <Hy>Text of heading </Hy> where y is
a number between 1 and 6. HTML automatically adds an extra blank line
before and after a heading.
Paragraphs
It is used to design and develop Web Pages. The first version of HTML was
written by Tim Berners-Lee in 1993. HTML is derived from Standard
Generalized Markup Language (SGML). SGML is a language used to define
other languages.
HTML5 is the latest version of HTML.
HTML is made up of element or Tags and attributes, which work together to
identify document parts and tell browsers how to display them.
All HTML tags are contained with the angle brackets(<>) e.g., <HTML> is a
tag.HTML tags are not case sensitive, <body> means the same as <BODY>
The HTML instructions are called tags, and look like
– <TAG> ….. Text here…….. </TAG>
Container tags :Tags that have starting as well as ending part.
– e.g.: <TITLE>Title of the Web Page </TITLE>
Empty tags : Tags that do not have the closing part.
– e.g. <BR> , <HR>
(HTML instructions + text to which the instructions apply)= HTML elements
An attribute is an additional feature you can use to configure the element
Structure of HTML Document
<HTML>
<HEAD> <!-- Head Section -->
<TITLE>Title of the Web Page </TITLE>
</HEAD>
<BODY> <!-- Body Section -->
<!-- Contents on Web Page -->
<H1> Contents </H1>
</BODY>
</HTML>
An HTML file can be created by using a simple text editor viz notepad, textpad,
editplus.
HTML file must have an extension htm or html.
,Every HTML program or document has a rigid structure. The entire web page
is enclosed within the <HTML> </HTML> tag. Within this tag, two distinct
sections,head and body are created. These sections are as described below.
Document Head
The text between the <HEAD> tag and the </HEAD> tag is header
information.Header information is not displayed in the browser window, it is
necessary for the internal working of the document. An exception to this is
the <TITLE> </TITLE> tag, which displays the document title in the browser’s
title bar.
Document Body
The <BODY></BODY> tag encloses the body of the HTML document.
Comments
The <!-- --> tag is used to insert a comment in the HTML source code. A
comment will be ignored by the browser. Comments can be used to explain
your code or earmark the areas that need improvement, which can help you
when you edit the source code at a later date.
e.g.: <!-- This is a comment -->
Note that you need an exclamation point after the opening bracket, but not
before the closing bracket.
Physical text formatting tags
Tag Description
<B>….</B> - Bold
<I>……</I> - Italic
<U>….</U> - Underline
<STRIKE>…</STRIKE> - Strikethrough
<TT>….</TT> - Typewriter (monospaced)
<CENTER></CENTER> - Centers the text on the screen.
<SUB>….</SUB> - Subscript
<SUP>….</SUP> - Superscript
<BIG>….</BIG> - Bigger font (one font size bigger)
<SMALL>….</SMALL> - Small font (one font size smaller)
The following example shows the basic use of the physical text formatting
tags:
<HTML>
<HEAD>
<TITLE> Physical tags </TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF“ TEXT =“red”>
<H1 ALIGN ="center"> Physical tags </H1>
<HR>
This is <B> bold </B> <BR>
This is <I> Italic </I> <BR>
This is <U> underline</U> <BR>
, This is <TT> Monospaced</TT> <BR>
This is <STRIKE> Strike-through</STRIKE> <BR>
This is <S>Strike-through</S> <BR>
This is <BIG> Big</BIG> <BR>
This is even<BIG><BIG> Bigger </BIG></BIG> <BR>
This is <SMALL> small</SMALL> <BR>
This is even<SMALL><SMALL> smaller</SMALL></SMALL> <BR>
This is <SUP> superscript</SUP> <BR>
This is <SUB> subscript</SUB> <BR>
</BODY>
</HTML>
Output:
Text Formatting tags
Header Tags
– HTML has six level of headings.
– Displayed in larger and bolder fonts.
– Different level heading tags
• <H1> Heading 1 </H1>
• <H2> Heading 2 </H2>
• <H3> Heading 3 </H3>
• <H4> Heading 4 </H4>
• <H5> Heading 5 </H5>
• <H6> Heading 6 </H6>
The font size of the heading will go on decreasing from H1 to H6.
Headings
HTML has six levels of headings, numbered 1 through 6, with 1 being the
largest. Headings are typically displayed in larger and/or bolder fonts than
normal body text. The first heading in each document should be tagged <H1>.
The syntax of the heading element is: <Hy>Text of heading </Hy> where y is
a number between 1 and 6. HTML automatically adds an extra blank line
before and after a heading.
Paragraphs