HTML 1
HTML 1
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 199. 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.
Applications of HTML
one of the most widely used language over
As mentioned before, HTML is
the web. I'm going to list few of them here:
. W e b pages development - HTML is used to create pages which are
rendered over the web. Almost every page of web is having html tags
in it to render its details in browser.
Internet Navigation - HTML provides tags which are used to
HTML Tags
<IDOCTYPE...>
This tag defines the document type and HTML version.
2 <html>
This tag encloses the complete HTML document and mainly comprises
of document header which is represented by <head>...</head>
and
document body which is represented by <body>...s/body> tags.
3 <head
This tag represents the document's header which can keep other HTML
tags like <title>, <link> etc.
4 stitle>
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 <hl>, <div>, <p> etc.
6 <h1>
This tag represents the heading.
7 p>
This tag represents a paragraph.
Heading Tags
Any document starts with a heading. You can use different sizes for your
headings. HTML also has six levels of headings, which use the elements
<h1>, <h2>, <h3>, <h4>, <h5>, and <h6>. While displaying any heading,
browser adds one line before and one line after that heading.
Paragraph Tag
The <p> tag offers a way to structure your text into different paragraphs.
Each paragraph oftext should go in between an opening <p> anda closing
/p> tag.
Centering Content
You can use <center> tag to put any content in the center of the page or any
table cell.
Horizontal Lines
Horizontal lines are used to visually break-up sections of a document. The
hr> tag creates a line from the current position in the document to the right
margin and breaks the line accordingly.
Again <hr /> tag is an example of the empty element, where you do not
need opening and closing tags, as there is nothing to go in between them.
Preserve Formatting8
Sometimes, you want your text to follow the exact format of how it is
written in the HTML document. In these cases, you can use the
preformatted tag <pre>
Any text between the opening <pre> tag and the closing </pre> tag will
preserve the formatting of the source document.
HTML - Elements
An HTML element is defined by a starting tag. If the element contains other
content, it ends with a closing tag, where the element name is preceded by a
forward slash as shown below with few tags
HTML Attributes
An attribute is used to define the characteristics of an HTML element
and is placed inside the element's opening tag. All attributes are made
up o f two parts - a name and a value
The name is the property you want to set. For example, the paragraph
<p> element in the example carries an attribute whose name is align,
which you can use to indicate the alignment of paragraph on the page.
The value is what you want the value of the property to be set and
always put within quotations. The below example shows three possible
values of align attribute: left, center and right.
Attribute names and attribute values are case-insensitive. However, the
World Wide Web Consortium (W3C) recommends lowercase
attributes/attribute values in their HTML 4 recommendation.
Example
Live Denmo
<IDOCTYPE html>
<html>
<head>
</html>
This will display the following result-
Core Attributes
The four core attributes that can beused on the majority of HTML elements
(although not all) are
Id
Title
Class
Style
The Id Attribute
The id attribute of an HTML tag can be used to uniquely identify any element
within an HTML page. There are two primary reasons that you might want to
use an id attribute on an element-
Internationalization Attributes
There are three internationalization attributes, which are available for most
(although not all) XHTML elements.
dir
.lang
xml:lang
Value Meaning
Itr Left to right (the default value)
HTML-Formatting
Ifyou use a word processor, you must be familiar with the ability to
make text bold, italicized, or underlined; these are just three of the ten
options available to indicate how text can appear in HTML and
XHTML.
Bold Text
Anything that appears within <b>..</b> element, is displayed
<head>
<title>Bo ld Text Example</title>
</ head>
<body>
<p>The foll owing word uses a <b>bold</b> typeface.</p>
</body>
</html
This will produce the following result-
Underlined Text
Anything that appears within <u>... </u> element, is displayed with underline.
Strike Text
Anything that appears within <strike>...</strike> element is displayed
with strikethrough, which is a thin line through the text.
Monospaced Font
The content of a <tt>...</tt> element is written in monospaced font.
Most of the fonts are known as variable-width fonts because different
letters are of different widths (for example, the letter 'm' is wider than
the letter i). In a monospaced font, however, each letter has the same
width.
Superscript Text
The content of a <sup>...</sup> element is written in superscript; the
font size used is the same size as the characters surrounding it but is
displayed halfa character's height above the other characters.
Deleted Text
Anything that appears within <del>...</del> element, is displayed as
deleted text.
Grouping Content
The <div> and <span> elements allow you to group together several
elements to create sections or subsections of a page.
For example, you might want to put all of the footnotes on a page within a
div> element to indicate that all of the elements within that <div>