2. Brief History of HTML
The first publicly
available description of
HTML was a document
called "HTML Tags", first
mentioned on the
Internet by Tim Berners-
Lee(father of HTML) in
late 1991.
It describes 18 elements
comprising the initial,
relatively simple design
of HTML.
HTML 1991
HTML 2.0 – introduced
by IETF (Internet
Engineering Task
Force)
Nov, 1995 –
several features
like forms,
tables, image
maps.
HTML 3.2 – W3C
published first
recommendation
1997
HTML 4.01 – W3C 1999
HTML5 2014
4. What is HTML
Hyper Text Markup Language
With HTML you can create a Web site.
HTML is a markup language that web
browsers use to interpret and compose text,
images, and other material into visual or
audible web pages.
5. Features of HTML
Easy and simple language.
Easy to make effective presentation
(formatting tags).
Markup language (flexible way to design web
pages along with the text. )
Facilitates to add link on the web pages to
enhances the interest of browsing.
Platform-independent
6. HTML Editors
Web pages are created/modified by using
some HTML Editors.
Eg
Notepad
Notepad++
Edit+
Dreamveawer
Sublime Text
8. Description
The DOCTYPE declaration defines the
document type.
Text between <html> & </html> describes the
web page.
Text between <body> & </body> is the page
content .
The <!DOCTYPE html> declaration is the
doctype for HTML5
9. HTML Tags and Elements
The whole HTML document is written n the
form of HTML Elements consisting of mark-up
Tags.
Mark-up tags are the fundamental
characteristics of HTML.
Every markup tag is composed of a keyword,
surrounded by angle brackets.
10. What is a Tag?
• HTML mark-up tags are usually called HTML
Tags
• HTML Tags is an instruction to the browser.
• HTML tags are keywords (tag names) surrounded
by angle brackets like [‘<‘ and ‘>’]. (<starttag>,
</endtag>)
Eg:- <html>, <body>,etc..
HTML tags normallt come in pairs like <b> &
</b>
11. What is Element?
• ‘HTML tag’ and ‘HTML Element’ are often used to
describe same thing
• But, HTML Element us everything between the
start tag and end tag.
<starttag>.. Contents.. </endtag>
Eg: <p> This is a paragraph </p>
14. Headings
Headings are used to defined as a title or a
subtitle.
HTML has 6 levels of headings
h1 is the largest heading tag and h6 is
smallest heading tag
When displaying any heading, browser adds
one line before and one line after that heading
15. Paragraph
The <p> tag will structure your text onto different
paragraphs.
Each paragraph is in between <p> and </p>
With HTML, you cannot change the output by
adding extra spaces or extra lines in your HTML
code.
The browser will remove any extra spaces and
extra lines when the page is displayed:
16. Line breaks
The <br> tag defines a line break.
Anything will start from new line after <br>.
<br> tag is example of empty (unpaired tag)
– where don’t need opening and closing tags.
17. Horizontal Lines
Used to visually break up sections of a
document.
It creates a line from current position to the
right margin and breaks the line accordingly.
It is also called a Horizontal Rule in HTML.
18. Preserving Format - <pre> tag
The <pre> element defines the preformatted
text.
The text inside a <pre> element is displayed
in a fixed-width font (usually Courier), and it
preserves both spaces and line break.
19. HTML Comments
Comments can be inserted into the HTML
code to make it more readable and
understandable.
These are ignored by the browser and not
displayed.
<!--Example-->
20. Conditional Comment &
Comment tag
Work in Internet Explorer (IE) on Windows but
they are ignored by the browsers.
They are supported from Explorer 5 onwards
and can use to give conditional instructions to
different version of IE.
Some browser support <comment> tag to
comment some part of HTML code.
21. HTML Attribute
An attribute is used define the characteristic of an HTML
Element.
It placed inside the element’s opening tag.
Attribute contains two parts: a name and a value
Attribute name and values are case-insensitive.
24. Attribute id
Used to uniquely identify any element within
an HTML page.
Reasons to use ‘id’ attribute
Possible to identify just that element and its
content.
If you have two elements with same name, it is
possible to distinguish them.
25. Attribute title
Gives a suggested title for an element.
Behavior will depend on the element that
carries it.
It is displayed as a tooltip when cursor over
the element or while the element is loading
26. Attribute class
Used to associate an element with a style
element and specifies the class of element.
The value of the attribute may also be a
space-separated list of class names.
class=“className1 className2 className3”
27. Attribute style
Allows to specify Cascading Style Sheet
(CSS) rules within the element.
Setting the style of an HTML element, can be
done with the style attribute.
The HTML style attribute has the following
syntax:
<tagname style="property:value;">
The property is a CSS property. The value is
a CSS value.
28. HTML Formatting
HTML Formatting indicate how text can appear in HTML.
Is a process of formatting text for better look and feel.
Some formats
Bold text
Italic Text
Underline Text
Strike Text
Monospaced Text
Superscript, Subscript
Inserted Text
Deleted Text
Larger Text
Smaller Text
29. HTML Quotation
HTML quotes are used to put a short quote by
using <q> tag.
HTML blockquote tag is used to define a large
quoted section. If you have a large quotation then
put the entire text within
<blockquote>.............</blockquote> tag.
Usually intended from left and right edges of the
surrounding text, and sometimes uses italicized
font
30. Abbreviation and Contact
Information
The HTML <abbr> element defines an
abbreviation or an acronym.
The HTML <address> element defines contact
information (author/owner) of a document or an
article.
The <address> element is usually displayed in
italic. Most browsers will add a line break before
and after the element.
31. Work title and Bi-Directional
The HTML <cite> element defines the title of
a work.
Browsers usually display <cite> elements in
italic.
The HTML <bdo> element defines bi-
directional override.
The <bdo> element is used to override the
current text direction
32. HTML Computer Code
HTML <code> tag is used to represent
computer code.
It is a phrase tag which defines a piece of
computer code.
By default, it is displayed in the browser's
default monospace font (also known as fixed-
width font).
33. Computer Code Formatting
HTML normally uses variable letter size and spacing.
This is not what we want when displaying computer
code.
The <kbd>, <samp>, and <code> elements are all
displayed in fixed letter size and spacing.
The HTML <var> element defines a variable.
The variable could be a variable in a mathematical
expression or a variable in programming context
34. Images
HTML allows to insert images in the web pages.
Images are defined by using <img> tag.
The <img> tag is empty, it contains attributes only, and
does not have a closing tag.
36. Images in Another Folder
<img src="/images/html5.gif" alt="HTML5 Icon" style="width:128px;height:128px;">
Images on Another Server
<img src="http://www.w3schools.com/images/w3schools_green.jpg"
alt="W3Schools.com">
Animated Images
<img src="programming.gif" alt="Computer Man"
style="width:48px;height:48px;">
37. Image Maps
An image-map is an image with clickable areas.
<map> tag is used to define image-map.
Syntax
<img src="planets.gif" alt="Planets" usemap="#planetmap"
style="width:145px;height:126px;">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.htm">
<area shape="circle" coords="90,58,3" alt="Mercury"
href="mercur.htm">
<area shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map
38. <image-map>
The ‘name’ attribute of the <map> tag is
associated with the <img>’s usemap attribute
and creates a relationship between the image
and the map.
The <map> tag contains a number of <area>
tags, that defines the clickable areas in the
image-map.
39. Anchor tag
The HTML anchor tag defines a hyperlink
that links one page to another page.
Links are defined with the <a> tag:
<a href="url">link text</a>
The href attribute specifies the destination
address of the link.
The link text is the visible part
40. Links - The target Attribute
The target attribute specifies where to open the linked
document.
The target attribute can have one of the following values:
_blank - Opens the linked document in a new window or
tab
_self - Opens the linked document in the same window/tab
as it was clicked (this is default)
_parent - Opens the linked document in the parent frame
_top - Opens the linked document in the full body of the
window
framename - Opens the linked document in a named frame
41. HTML Link Colors
By default, a link will appear like this (in all
browsers):
An unvisited link is underlined and blue
A visited link is underlined and purple
An active link is underlined and red
By using styles we can change colors.
42. Images as Links
We can also use an image as link.
<a href=“#">
<img src="smiley.gif" alt="HTML tutorial"
style="width:42px;height:42px;border:0;">
</a>
43. HTML Colors
A color can be specified by using
Color name
an RGB and or
a HEX.
44. RGB Value
Using formula: rgb(red, green, blue)
Each parameter (red, green, and blue) defines the intensity
of the color between 0 and 255.
For example,
rgb(255,0,0) is displayed as red, because red is set to its
highest value (255) and the others are set to 0.
rgb(0,255,0) is displayed as red, because green is set to its
highest value (255) and the others are set to 0.
rgb(0,0,255) is displayed as red, because blue is set to its
highest value (255) and the others are set to 0.
45. HEX Value
A color can also be specified using a
hexadecimal value in the form: #RRGGBB,
where RR (red), GG (green) and BB (blue)
are hexadecimal values between 00 and FF
(same as decimal 0-255).
For example,
#FF0000 is displayed as red, because red is set
to its highest value (FF) and the others are set
to the lowest value (00).
46. HTML with CSS
CSS stands for Cascading Style Sheets.
CSS describes how HTML elements are to be displayed
on screen, paper, or in other media.
CSS saves a lot of work. It can control the layout of
multiple web pages all at once.
CSS can be added to HTML elements in 3 ways:
Inline - by using the style attribute in HTML elements
Internal - by using a <style> element in the <head> section
External - by using an external CSS file
47. Inline CSS
Used to apply a unique style to a single HTML
element.
It uses the style attribute of an HTML element.
48. Internal CSS
An internal CSS is used to define a style for a
single HTML page.
An internal CSS is defined in the <head>
section of an HTML page, within a <style>
element:
49. External CSS - Link tag
An external style sheet is used to define the style for
many HTML pages.
With an external style sheet, you can change the
look of an entire web site, by changing one file!
To use an external style sheet, add a link to it in the
<head> section of the HTML page
<link rel="stylesheet" href="styles.css“>
50. Tables
HTML table tag is used to display data in
tabular form (row * column). There can be
many columns in a row.
HTML tables are used to manage the layout
of the page e.g. header section, navigation
bar, body content, footer section etc. But it is
recommended to use div tag over table to
manage the layout of the page .
52. Table border
If we don’t specify a border for the table, it will
be displayed without borders.
A border is set using CSS property.
table, th, td{
border: 1px solid blue;
}
53. Border Collapse
If the borders to be collapsed into one border,
add border-collapse property.
table, th, td{
border: 1px solid red;
Border-collapse: collapse;
}
54. Cell-padding
Specifies the space between the cell and the
content.
To set padding, we use CSS padding property
th, td{
padding: 15px;
}
55. Cell-spacing
Specifies the space between the cells.
To set the cell-spacing, use CSS border-
spacing property.
Deprecated in html5
56. Border-spacing
Specifies the space between the cells.
To set the border-spacing, use CSS border-
spacing property.
table{
border-spacing: 3px;
}
57. Text-align
By default table headings are bold and
centered and table data are aligned to left.
To modify the alignment, use CSS text-align
property.
th, td{
text-align:right
}
58. Cell-span
We can combine either two or more rows or
columns by using rowspan and colspan.
Rowspan: use to combine more than one row
Colspan: use to combine more than one
column
60. Table caption
Adds caption to the table.
The <caption> tag must be inserted
immediately after the <table> tag.
<table>
<caption>…</caption>
…..
</table>
61. Table- colgroup
The <colgroup> tag specifies a group of one
or more columns in a table for formatting.
The <colgroup> tag is useful for applying
styles to entire columns, instead of repeating
the styles for each cell, for each row.
62. Lists
Use to specify list of information.
Lists may contain one or more list elements.
There are three types of lists:
Ordered List
Unordered List
Description List
63. Ordered Lists or Numbered Lists
All the list items are marked with numbers.
It defines the type of the list item marker.
An ordered list starts with <ol> tag .Each list item
starts with <li> .
<ol>
<li>….<.li>
<li>….<.li>
<li>….<.li>
</ol>
64. <ol> type attribute
The list items will be marked with numbers by
default.
The type attribute of the <ol> tag, defines the
type of the list item marker:
65. type values
Type Description
type="1"
The list items will be numbered with
numbers (default)
type="A"
The list items will be numbered with
uppercase letters
type="a"
The list items will be numbered with
lowercase letters
type="I"
The list items will be numbered with
uppercase roman numbers
type="i"
The list items will be numbered with
lowercase roman numbers
66. start Attribute
<ol> tag can be specified with stating point of
numbering you want.
Example:
<ol type=“1” start=“3”> starts with number 3
<ol type=“i” start=“3”> starts with number iii
<ol type=“I” start=“3”> starts with number III
<ol type=“a” start=“3”> starts with number c
<ol type=“A” start=“3”> starts with number C
67. Unordered Lists
It defines the type of the list item marker.
An ordered list starts with <ul> tag .Each list
item starts with <li> .
<ul>
<li>….<.li>
<li>….<.li>
<li>….<.li>
</ul>
68. <ul> type attribute
The list items will be marked with bullets
(small black circles) by default
The type attribute of the <ol> tag, defines the
type of the list item marker:
69. type valuesValue Description
disc
Sets the list item marker to a bullet
(default)
circle Sets the list item marker to a circle
square Sets the list item marker to a square
none The list items will not be marked
70. HTML Description Lists
A description list is a list of terms, with a
description of each term.
<dl> -----------------description list
<dt>….</dt> -----term (name)
<dd>..</dd> -----each term
<dt>…</dt>
<dd>…</dd>
<dl>
71. HTML Blocks & Inline Elements
Every HTML element has a default display
value depending on what type of element it is.
The default display value for most elements
Block or
Inline.
72. Block-level Elements
A block-level element always starts on a new
line and takes up the full width available
(stretches out to the left and right as far as it
can).
<div>
<h1> - <h6>
<p>
<form>
73. Inline Elements
An inline element does not start on a new line
and only takes up as much width as
necessary.
<span>
<a>
<img>
74. <div> Element
The <div> element is often used as a
container for other HTML elements.
The <div> element has no required attributes,
but both style and class are common.
When used together with CSS, the <div>
element can be used to style blocks of
content
75. The <span> Element
The <span> element is often used as a
container for some text.
<h1>My <span style="color:red">Important</span>
Heading</h1>
76. HTML Classes
The HTML class attribute makes it possible to
define equal styles for elements with the
same class name.
77. HTML Form
An HTML form is a section of a document
which contains controls such as text fields,
password fields, checkboxes, radio buttons,
submit button, menus etc.
An HTML form facilitates the user to enter
data that is to be sent to the server for
processing
78. <form> Element
The HTML <form> element defines a form
that is used to collect user input:
<form>
form elements
</form>
79. The <input> Element
The <input> element defines the input control.
The <input> element can be displayed in
several ways, depending on the type
attribute.
Type Description
<input type="text"> Defines a one-line text input field
<input type="radio">
Defines a radio button (for selecting one of many
choices)
<input type="submit"> Defines a submit button (for submitting the form)
80. Form Elements
The <input> Element
type=“text”
type=“password”
type=“submit”
type=“reset”
type=“radio”
type=“checkbox”
type=“button”
81. <select> box
Also called as drop down which provides
option to list down various options in the form
of drop down list where user can select one or
more options.
<select>
<option selected>……</option>
<option>……</option>
<option>……</option>
</select>
82. File upload
Also called as file select box.
Allows to upload a file/image to web site.
Created using <input> tag with ‘type’ attribute
‘file’.
Syntax:
<input type=“file” name=“…”>
83. HTML form Attributes
The ‘action’ attribute: defines the action to be
performed when the form is submitted.
<form action="action_page.asp">
If the action attribute is omitted, the action is
set to the current page.
84. The Method Attribute
The method attribute specifies the HTTP method
(GET or POST) to be used when submitting the
form data.
<form action="action_page.php"
method="get">
or
<form action="action_page.php"
method="post">
85. When to Use GET Method
The default method when submitting form data is
GET.
However, when GET is used, the submitted form
data will be visible in the page address field
Note: GET must NOT be used when sending sensitive information!
GET is best suited for short, non-sensitive, amounts of data,
because it has size limitations too.
86. When to Use POST Method
Always use POST if the form data contains
sensitive or personal information. The POST
method does not display the submitted form
data in the page address field.
POST has no size limitations, and can be
used to send large amounts of data.
87. The name Attribute
Each input field must have a name attribute to
be submitted.
If the name attribute is omitted, the data of
that input field will not be sent at all.
88. Form Attributes
The value Attribute-specifies the initial value
for an input field
The readonly Attribute-specifies that the
input field is read only (cannot be changed)
The disabled Attribute-specifies that the
input field is disabled
The size Attribute-specifies the size (in
characters) for the input field
89. The maxlength Attribute
Specifies the maximum allowed length for the
input field.
With a maxlength attribute, the input field will
not accept more than the allowed number of
characters.
90. <fieldset>
The <fieldset> element is used to group
related data in a form.
The <legend> element defines a caption for
the <fieldset> element.
<fieldset>
<legend>Personal information:</legend>
First name:<br>
<input type="text" name="firstname"
value="Mickey"><br>
Last name:<br>
<input type="text" name="lastname"
value="Mouse"><br><br>
<input type="submit" value="Submit">
</fieldset>
91. HTML Iframes
An iframe is used to display a web page
within a web page.
An HTML iframe is defined with the <iframe>
tag
<iframe src="URL"></iframe>
The src attribute specifies the URL (web
address) of the inline frame page
92. iframes
The iframe tag defines a rectangular region
within the document in which browser can
display a separate document, including
scrollbars and borders.
93. Iframe Properties
The height and width attributes are used to
specify the size of the iframe.
By default, an iframe has a border around it.
To remove the border, add the style attribute
and use the CSS border property.
<iframe src="demo_iframe.htm"
style=“border:none” height="200"
width="300"></iframe>
94. Iframe - Target for a Link
An iframe can be used as the target frame for
a link.
The target attribute of the link must refer to
the name attribute of the iframe
95. HTML Symbols and HTML
Entities
Some characters are reserved in HTML.
If you use ‘<‘ and ‘>’ signs in text, the browser might
consider them as tag.
Those reserved characters in HTML must be replaced
by character Entities.
The characters that are not present on keyboard can
also be replaced by Entities.
96. Syntax
A character entity looks like this:
&entity_name;
OR
&#entity_number;
Advantage of using an entity name: An entity name
is easy to remember.
Disadvantage of using an entity name: Browsers
may not support all entity names, but the support for
numbers is good.
97. Non-breaking Space
A non-breaking space is a space that will not
break into a new line.
Another common use of the non-breaking
space is to prevent that browsers truncate
spaces in HTML pages.
Syntax:
99. Combining Diacritical Marks
A diacritical mark is a "glyph" added to a letter.
Some diacritical marks, like grave ( ̀) and acute
( ́) are called accents.
Diacritical marks can appear both above and
below a letter, inside a letter, and between two
letters.
Diacritical marks can be used in combination with
alphanumeric characters, to produce a character
that is not present in the character set (encoding)
used in the page.
100. Mark Character Construct Result
̀ a à à
́ a á á
̂ a â â
̃ a ã ã
̀ O Ò Ò
́ O Ó Ó
̂ O Ô Ô
̃ O Õ Õ
101. Symbols
Many mathematical, technical, and currency
symbols, are not present on a normal
keyboard.
To add such symbols to an HTML page, you
can use an HTML entity name.
If no entity name exists, you can use an entity
number, a decimal, or hexadecimal reference.
102. Char Number Entity Description
∀ ∀ ∀ FOR ALL
∂ ∂ ∂
PARTIAL
DIFFERENTIAL
∃ ∃ ∃ THERE EXISTS
∅ ∅ ∅ EMPTY SETS
∇ ∇ ∇ NABLA
∈ ∈ ∈ ELEMENT OF
∉ ∉ ∉
NOT AN
ELEMENT OF
∋ ∋ ∋
CONTAINS AS
MEMBER
∏ ∏ ∏ N-ARY PRODUCT
∑ ∑ ∑
N-ARY
SUMMATION
104. Marquee tag
The Marquee HTML tag is a non-standard
HTML element which is used to scroll a image
or text horizontally or vertically.
In simple words, you can say that it scrolls the
image or text up, down, left or right
automatically.
Marquee tag was first introduced in early
versions of Microsoft's Internet Explorer. It is
compared with Netscape's blink element
105. Attribute Description
width
This specifies the width of the marquee. This can be a value like
10 or 20% etc.
height
This specifies the height of the marquee. This can be a value like
10 or 20% etc.
direction
This specifies the direction in which marquee should scroll. This
can be a value like up, down, left or right.
behavior
This specifies the type of scrolling of the marquee. This can have
a value like scroll, slide and alternate.
scrolldelay
This specifies how long to delay between each jump. This will
have a value like 10 etc.
scrollamount
This specifies the speed of marquee text. This can have a value
like 10 etc.
loop
This specifies how many times to loop. The default value is
INFINITE, which means that the marquee loops endlessly.
bgcolor
This specifies background color in terms of color name or color
hex value.
hspace
This specifies horizontal space around the marquee. This can be
a value like 10 or 20% etc.
vspace
This specifies vertical space around the marquee. This can be a
value like 10 or 20% etc.
106. HTML JavaScript
JavaScript makes HTML pages more dynamic
and interactive.
Common uses for JavaScript are image
manipulation, form validation, and dynamic
changes of content.
107. Syntax
The <script> tag is used to define a client-side script
(JavaScript).
The <script> element either contains scripting
statements, or it points to an external script file through
the src attribute.
Syntax
<script>…..</script>
<script src=“url”></script>
108. The HTML <noscript> Tag
The <noscript> tag is used to provide an
alternate content for users that have disabled
scripts in their browser or have a browser that
doesn't support client-side scripts.
The <noscript> element can be used within
<head> and <body> tags.
The text inside the <noscript> element will be
displayed if the user's browser is not script
supporting.
109. HTML <head> Element
The <head> element is a container for
metadata (data about data) and is placed
between the <html> tag and the <body> tag.
HTML metadata is data about the HTML
document. Metadata is not displayed.
110. Metadata
Metadata typically define the document title,
character set, styles, links, scripts, and other
meta information.
The following tags describe metadata: <title>,
<style>, <meta>, <link>, <script>, and
<base>.
111. The HTML <title> Element
The <title> element defines the title of the
document, and is required in all
HTML/XHTML documents.
The <title> element:
defines a title in the browser tab
provides a title for the page when it is added to
favorites
displays a title for the page in search engine
results
112. <style>, <script>, <link>
The <style> element is used to define style
information for a single HTML page
The <link> element is used to link to external
style sheets.
The <script> element is used to define client-
side JavaScripts.
113. <meta> Element
The <meta> element is used to specify which
character set is used, page description,
keywords, author, and other metadata.
Metadata is used by browsers (how to display
content), by search engines (keywords), and
other web services.
114. Define the character set used:
<meta charset="UTF-8">
Define a description of your web page:
<meta name="description" content="Free Web
tutorials">
Define keywords for search engines:
<meta name="keywords" content="HTML, CSS,
XML, JavaScript">
Define the author of a page:
<meta name="author" content=“Ranjith">
Refresh document every 30 seconds:
<meta http-equiv="refresh" content="30">
115. HTML Encoding (Character Sets)
To display an HTML page correctly, a web
browser must know which character set
(character encoding) to use.
116. ASCII
ASCII was the first character encoding standard
(also called character set). ASCII defined 127
different alphanumeric characters that could be
used on the internet: numbers (0-9), English
letters (a-z, A-Z), and some special characters like
! $ + - ( ) @ < > .
Reference: http://www.w3schools.com/charsets/default.asp
117. ANSI
ANSI (Windows-1252) was the original Windows
character set, with support for 256 different
character codes.
Reference: http://www.w3schools.com/charsets/default.asp
118. ISO-8859-1
ISO-8859-1 was the default character set for HTML
4. This character set also supported 256 different
character codes.
Because ANSI and ISO-8859-1 were so limited, the
default character encoding was changed to UTF-8 in
HTML5.
Reference: http://www.w3schools.com/charsets/default.asp
119. UTF-8 (Unicode)
UTF-8 (Unicode) covers almost all of the characters
and symbols in the world.
Unicode enables processing, storage, and transport
of text, independent of platform and language.
Reference: http://www.w3schools.com/charsets/default.asp
120. DOM
The Document Object Model (DOM) is a
programming API for HTML and XML
documents.
It defines the logical structure of documents
and the way a document is accessed and
manipulated.
121. DOM
As a W3C specification, one important
objective for the Document Object Model is to
provide a standard programming interface
that can be used in a wide variety of
environments and applications.
The Document Object Model can be used
with any programming language.
122.
123. DOCTYPE
The <!DOCTYPE> declaration is not an HTML
tag; it is an instruction to the web browser
about what version of HTML the page is
written in.
124. DOCTYPE
According to the HTML specification or
standards, every HTML document requires a
document type declaration to insure that
your pages are displayed the way they are
intended to be displayed.
The <!DOCTYPE> declaration must be the
very first thing in your HTML document,
before the <html> tag.
125. <!DOCTYPE html>
Doctypes from earlier versions of HTML were
longer because the HTML language was
SGML-based and therefore required a
reference to a DTD, but they are obsolete
now.
With HTML5 this is no longer the case and
the doctype declaration is only needed to
enable the standard mode for documents
written using the HTML syntax.
127. HTML 4.01 Strict
The HTML 4.01 Strict DTD includes all elements
and attributes that have not been deprecated or
do not appear in frameset documents. For
documents that use this DTD, use the following
DOCTYPE declaration:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.01//EN” “http://www.w3.org/TR/html4/strict.dtd">
128. HTML 4.01 Transitional
The HTML 4.01 Transitional DTD includes
everything in the strict DTD as well as deprecated
elements and attributes but excludes the frameset
content. For documents that use this DTD, use
the following DOCTYPE declaration:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
129. HTML 4.01 Frameset
The HTML 4.01 Frameset DTD includes
everything in the transitional DTD, as well as
also allows the use of frameset content. For
documents that use this DTD, use the
following DOCTYPE declaration:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
Editor's Notes
In 1980, physicist Tim Berners-Lee(father of HTML), a contractor at CERN, proposed and prototyped ENQUIRE, a system for CERN researchers to use and share documents.
In 1989, Berners-Lee wrote a memo proposing an Internet-based hypertext system.
Berners-Lee specified HTML and wrote the browser and server software in late 1990.
Hyper Text: Hyper Text simply means "Text within Text". A text has a link within it, is a hypertext. Every time when you click on a word which brings you to a new webpage, you have clicked on a hypertext.
Markup language: A markup language is a programming language that is used make text more interactive and dynamic. It can turn a text into images, tables, links etc.
1) It is a very easy and simple language. It can be easily understood and modified.
2) It is very easy to make effective presentation with HTML because it has a lot of formatting tags.
3) It is a markup language so it provides a flexible way to design web pages along with the text.
4) It facilitates programmers to add link on the web pages (by html anchor tag) , so it enhances the interest of browsing of the user.
5) It is platform-independent because it can be displayed on any platform like Windows, Linux and Macintosh etc.
6) It facilitates the programmer to add Graphics, Videos, and Sound to the web pages which makes it more attractive and interactive.
There are two type of Tags : Paired tags & Unpaired tags
Web browser read the document from top to bottom and left to right. These tags are used to create HTML documents and render their documents. Each tag has it’s different properties.
Sample Example:
We will be learning on each and every elements clearly later in sessions
Eg: headings (1)
Any document starts with a heading.
Eg: Paragraph (2)
Eg: <br> (6)
The <br /> has space btw the characters br and the forward slash. If you omit the space, older browsers will have trouble rendering the line break. Also if you miss the forward slash character it is not valid in XHTML.
Eg: hr tag (16)
HTML <hr> tag is used to specify a paragraph-level thematic break in HTML document. It is used when you abruptly change your topic in your HTML document. It draw a horizontal line between them. It is also called a Horizontal Rule in HTML.
Eg: pre-tag (8)
Sometimes we ant to text to follow the exact format of how it is written in the HTML Document.
Eg: comments (15)
Eg: attribute (34)
Need write pgm
Need write pgm
Need to write pgm
Need to write pgm
TextFomats (3), (7), ins-del (12), sub-sup (9)
Eg: quotations (10)
Eg: abbr (11), address (14)
Eg: Bdo (13)
Eg: computed (17)
Eg: computed (17)
Eg: images (5)
Eg: images (5)
Eg: hyperlink (4)
Need to write pgm
Eg: linkcolors (38)
To display the color black, all color parameters must be set to 0, like this: rgb(0,0,0).
To display the color white, all color parameters must be set to 255, like this: rgb(255,255,255).
Eg: inlinecss (35)
Eg: internalcss (37)
Eg: externsalcss (38)
The <td> elements are the data containers of the table.They can contain all sorts of HTML elements; text, images, lists, other tables, etc.
Eg: tables (18)
Here there for both cell and over all table will have borders
Eg: table-border (21)
Eg: cell-padding (22)
Eg: cell-spacing (23)
Eg: colspa-rowspan (24)
Eg: caption (20)
Eg: table-colgroup (25)
Eg: lists (26)
The CSS list-style-type property is used to define the style of the list item marker
The CSS list-style-type property is used to define the style of the list item marker
Eg: lists (26)
Eg: 40.span
Need to write pgm
Normally, the form data is sent to a web page on the server when the user clicks on the submit button.
Eg: form (27)
Eg: iframes (28) – need to check
Eg:
While using noscript tag inside <head> element, <noscript> must contain <link>, <style>, and <meta> tags.