Hyper Text Markup Language
Hyper Text Markup Language
HTML
BACK GROUND OF HTML
• Used to write to HTML documents knows as web
pages.
• Its output can be viewed in any browser.
• Once pages are created we can upload these
pages using any FTP software.
• The web depends upon three things -
– URL (uniform naming scheme for locating resources
over the web.
– Name/ ID of the machine hosting the resources.
– Name/ ID of the resource itself.
HISTORY OF HTML
• A method where ordinary text can be converted
into hypertext.
• Set of special codes included to control the
layout and appearance of the text.
• HTML is not a programming language.
• Tells the browser, how to display the contents.
• Tim Berners Lee developed HTML in early 1990’s.
• W3C is the body which controls the HTML
standards.
• HTML is subset of SGML, originated in 1960
DOCUMENT TYPES IN HTML
The DTD specifies the rules for the markup language, so that the
browsers render the content correctly.
• When you validate your web page the HTML validator checks the coding
against the applicable standard then reports which portions of the
coding do not pass HTML validation.
WHAT HAPPENS IF THE DOCTYPE DECLARATION (DTD) IS
NOT INCLUDED OR IS INCORRECT?
You will not be able to use a HTML validator to check the
page coding. HTML validation requires the DOCTYPE
declaration.
The browser rending the web page will process the coding in
Quirks Mode.
• <del>….</del>
– The <del> tag defines text that has been deleted from a
document.
• <strike>….</strike>
– The text will be displayed with single strike through line.
• <strong>....</strong>
– Used to emphasize text more, which usually appears in
bold, but can vary according to your browser.
• <sub>….</sub>
– Defines subscripted text below the normal text.
• <sup>….</sup>
– Defines superscripted text above the normal text.
• <ins>….</ins>
– Defines inserted text.
• <mark>….</mark>
– Defines marked/highlighted text.
• <pre> ….</pre>
– Any text, including spaces, carriage returns and punctuation,
will appear in the browser as it would in a text editor
(normally browsers ignore multiple spaces).
– Its attribute is width which specifies the number of
characters per line
• <code>….</code>
– Commonly used to show source code.
• <tt>…. </tt>
– The text appears to have been typed by a typewriter.
• <blockquote>…. </blockquote>
– Defines a long quotation, and the quote is displayed with
an extra wide margin on the left hand side of the block
quote.
• <center>….</center>
– It makes everything in between the tags centered (in the
middle of the page).
<H1> TO <H6>
• The <h1> to <h6> tags are used to define HTML
headings.
• <h1> defines the most important heading.
• <h6> defines the least important heading.
• Its major attributes –
– Align = left, center, right and justify
<FONT>…..</FONT>
• The <font> tag specifies the font face, font size, and
font color of text.
• Its major attributes
– Color = specifies the color of text
– Face = specifies the font style of text
– Size = specifies the size of the text
<HR>
• The <hr> tag defines a thematic break in an HTML
page (e.g. a shift of topic).
• The <hr> element is used to separate content (or
define a change) in an HTML page.
• Its major attributes
– Align = left, right, center
– Noshade = Specifies that a <hr> element should render
in one solid color (noshaded), instead of a shaded color
– Size = Specifies the height of a <hr> element in pixels
– Width = Specifies the width of a <hr> element in %pixels.
<BR>
• The <br> tag inserts a single line break.
• It don’t have any attributes
<Q>
• The <q> tag defines a short quotation.
• Browsers normally insert quotation marks around
the quotation
<FIGURE>…..</FIGURE>
• The <figure> tag specifies self-contained content,
like illustrations, diagrams, photos, code listings,
etc.
<IMG>
• The <img> tag defines an image in an HTML page.
• Its attributes are –
– Src = Specifies the URL of an image.
– Align = Specifies the alignment of an image according to
surrounding elements (top, bottom, middle, left and right)
– Height= Specifies the height of an image in pixels
– Width = specified the width of an image in pixels
– Hspace = Specifies the whitespace on left and right side of an
image in pixels
– Vspace = Specifies the whitespace on top and bottom of an
image in pixels
– Border = Specifies the width of the border around an image
in pixels
– Alt = Specifies an alternate text for an image
USING LIST IN HTML
PURPOSE OF USING LIST
• Can be used to show sequence of data
• Can be used to show data without any sequence
• Can be used to show sequences and
unsequenced data together.
• Can be used to describe the facts also.
TYPES OF LISTS
• Ordered List
• Unordered List
• Nested List
• Definition List
ORDERED LIST
• Used to display sequenced or arranged data.
• Implemented with tags like
• <ol>
<li>……</li>
<li>……</li>
</ol>
• Attributes of <ol>
– Type = “A”,”a”,”1”,”I”,”i”
– Start = when we have to start listing from other than default
starting point
• Attributes of <li>
– Value = when we have to give particular value to the current list
item rest will continue
UNORDERED LIST
• Used when no sequenced or arranged data is to be displayed.
• Implemented with tags like
• <ul>
<li>……</li>
<li>……</li>
</ul>
• Attributes of <ul>
– Type = “Square”, ”Circle”, ”Disk”
NESTED LIST
• Used when we have to place ordered list within an unordered
list and vise versa.
• Implemented with tags like
• <ul>
<li>……</li>
<ol>
<li>….</li>
<li>….</i>
</ol>
</ul>
DEFINITION LIST
• Used when we have to discuss terms and their definitions
• Implemented with tags like
• <dl>
<dt>……</dt>
<dd>……</dd>
</dl>
USING EMBED TAG
• The HTML <embed> tag is used to embed
multimedia in an HTML document.
• We can use <noembed> tag along with this tag to
handle browsers who do not support embed tag.
• <embed src="yourfile.mid" autostart="true"
hidden="false" loop="false">
• <noembed><bgsound src="yourfile.mid"
loop="1"></noembed>
ATTRIBUTES OF EMBED TAG
• Src = used to define the source to be embeded.
• Align = Left, Right, Center
• Autostart = “1” or “0”. Indicates if sound start automatically
or not.
• Controls = used to display controls
• Loop = specifies the number of times the sound would be
played continuously.
• Height = Height of the object in pixels or en.
• Width = Width of the object in pixels or en.
<VIDEO>….</VIDEO>
• <video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
</video>
• Autoplay = Specifies that the video will start playing as soon as
it is ready.
• Controls = Specifies that the video will start playing as soon as it
is ready.
• Loop = Specifies that the video will start over again, every time
it is finished.
• Muted = Specifies that the audio output of the video should be
muted.
• Src = Specifies the URL of the video file.
• Height = Sets the height of the video player.
• Width = Sets the width of the video player.
THANKS