HTML Tutorial
HTML Tutorial
HTML is a language for creating web pages. HTML stands for Hyper Text Markup Language.
HTML is a markup language. A markup language is a set of markup tags. The tags describe
document content. HTML documents contain HTML tags and plain text. HTML documents
are also called web pages.
Note: Every webpage must have some HTML; otherwise it would not be a webpage without
it.
HTML Versions
HTML and first browsers were invented in early 1990’s by Tim Berners-Lee a scientist in
Geneva, Switzerland but was published to the general public in 1991 as a short document that
detailed a minority of elements used to build web pages. He intended the technology to be used
as a means of sharing technical papers and information via the internet. The elements were for
defining content such as headings, paragraphs, lists, and links to other pages. HTML’s version
numbers have increased as the language has evolved with the introduction of other elements
and adjustments to its rules. The current version is HTML5.
HTML5 strives to reflect the needs of both current and future websites. HTML5 inherits most
of its features from its predecessors, meaning that if one knows how code in HTML, the person
already knows much about HTML5. This means that HTML5 works in both old and new web
browsers; backward compatibility is a key design principle of HTML5.
HTML5 has many new features both simple and complex that aid in creating powerful web
applications.
Version Year
HTML 1991
HTML+ 1993
HTML4.0 1989
XHTML 2000
HTML5 2012
HTML Tags
HTML tags are keywords (tag names) surrounded by angle brackets like <html>
HTML tags normally come in pairs like <p> and </p>, the first tag in a pair is the start
tag, the second tag is the end tag
The end tag is written like the start tag, with a forward slash before the tag name
Start and end tags are also called opening tags and closing tags
Adobe Dreamweaver
Microsoft Expression Web
CoffeeCup HTML Editor
For starters, a text editor like Notepad (PC) or TextEdit (Mac) is recommended.
Web Browsers
The purpose of a web browser (such as Google Chrome, Internet Explorer, Firefox, Safari) is
to read HTML documents and display them as web pages. The browser does not display the
HTML tags, but uses the tags to determine how the content of the HTML page is to be
presented/displayed to the user. Most modern web browser feature developer tools. Developer
tools can help web developers when designing a website in the following ways:
The following are ways a web designer can ensure that a webpage works across a range of
different web browsers:
Use W3C web standards. Most recent browsers support web standards
Testing. View the site in as many different browsers as possible before making a site
‘live’.
THINKING IN HTML
Although webpages have become complex, their underlying structure remains simple. HTML
gives meaning to the webpage content. A webpage is made up of three components:
Text Content; The text that appears on the page to inform visitors about the products, business
or whatever maybe on the webpage.
References to other documents; These load items such as images, videos, audio files as well
as style sheets (cascading style sheets) and Java script files which adds special behaviour to the
webpages.
Mark Up; The HTML elements that describe text content and make references work.
MARK UP
Elements; are labels that describe the different parts of a webpage: heading, paragraph, body
etc. Some elements have one or more attributes which further describe the element. Attributes
contain additional information about an element. It is customary to type element and attribute
names in lower case. HTML attributes are special words used inside the opening tag to control
the element's behaviour. HTML attributes are a modifier of a HTML element type. For
example, attributes can be used to change the color, size, or functionality of HTML elements.
The <a> tag defines a hyperlink. The href attribute specifies the URL of the page the link goes
to:
Example
Most elements can contain text. Such elements consist of a start tag (the element name and
attribute, if any, enclosed in less-than and greater-than signs), the content, and followed by the
element name, again enclosed in less-than and greater-than signs). For example <p> This is
amazing </p>.
There are also a handful of empty elements (void elements) which cannot contain text or other
elements. They are a combination of a start and end tag with an initial less-than, the elements
name followed by an attribute name, an optional space, an optional forward slash and a final
greater than sign, which is required.
Attribute values may be enclosed in quotation marks. If an element can contain other elements,
it is considered to be parent of the enclosed.