Beruflich Dokumente
Kultur Dokumente
Lesson 1
HTML Basics
Introduction to HTML
Lesson Objectives
What is HTML
HTML Editors
HTML Tags
More on Tags
Elements & Attributes
Minimal HTML Document
Introduction to HTML
What is HTML?
Hypertext Mark-up Language.
HTML is an SGML DTD; Standard
Generalized Markup Language and
Document Type Definition.
Language used for World Wide Web
documents; in ASCII format.
HTML was invented by Tim Berners-Lee for the Laboratory of Particle Physics
(CERN) in Geneva. Initially, the Standardized General Markup Language was
used to create Internet documents. However, researchers who wanted to share
their papers over the Internet found it quite cumbersome and complex to code in
SGML; thus, HTML was developed.
HTML is not a programming language. It is referred to as a DTD Document
Type Definition language. HTML describes how to mark up text using
formatting options. Therefore, HTML documents can be created in a simple textediting program like Windows Notepad. HTML files must be saved with a.htm
or .html extension.
HTML is interpreted for visual display by a web browser such as Netscape
Navigator or Microsoft Internet Explorer. Once an HTML file has been coded and
saved, it has to be viewed in a browser to see its fully realigned output.
Introduction to HTML
HTML Editors
WYSIWYG (what you see is what you
get) editors.
Help in designing HTML documents
visually.
MS FrontPage, Claris Home Page,
Adobe Page Mill, Symantec Visual Page,
etc.
HTML editors are like helper programs. They assist designers with the coding of
web pages. However, HTML editors come in all shapes and sizes in terms of
their capabilities and the extent of their help to the designer.
For instance, a program like Allaires HomeSite allows you to do most of the
coding while providing assistance with the syntax and typing. On the other hand,
with a program like Microsoft FrontPage, even a novice can create an entire web
site with little or no knowledge of HTML.
Therefore, web site designers can decide the level of control they are
comfortable with and which features they will utilize the most often.
Introduction to HTML
Elements of HTML
An element is a fundamental component
of the structure of a web page.
For example:
Head
Body
Table
Paragraph
List
Lesson 1 - Basics of HTML
Introduction to HTML
HTML Tags
An HTML tag is used to mark elements
in a document for your browser to
display in a certain format.
HTML tags are denoted by a left angle
bracket: <, a tag name, and a right
angle bracket.
Tags are generally paired (e.g. <Head>
</HEAD>).
The end tag is just like the start tag
except that it has a slash preceding the
tag name.
Lesson 1 - Basics of HTML
Elements are defined with tags, which are interpreted and displayed in a web
browser window. The syntax/format for writing HTML tags is as follows:
Opening Tag: <Tag Name>
Content: The tag will apply to this text.
Closing Tag: </Tag Name>
For example:
<HTML>
Allthecontentsofthedocumentgointhisspacebeforethe
closingHTMLtag.
</HTML>
Introduction to HTML
As stated above, HTML tags are not case-sensitive. So, they can be written in
either upper or lower case as preferred by the web designer. Nonetheless, the
content within the tags, file names, and path names, are all case-sensitive. This
will be covered in further detail in the next two lessons.
Whenever a browser encounters an HTML tag that it does not support, it simply
ignores it. However, any text between the tags will be displayed in the browser
window. This feature is beneficial because when the browser sees an unfamiliar
tag, it does not give an error message. It shows the content between the tags
and continues to interpret the rest of the document.
Introduction to HTML
Introduction to HTML
The Minimal
HTMLTags
Document
Main HTML
Each
HTML
- Alerts
the browser
that the
HTML
document
should contain
atfile
contains
HTML-coded
information.
least the tags
listed below:
<HTML>
HEAD -, <
Identifies
the
first, part
of your
HEAD>, <
TITLE>
<BODY>
that
contains the title.
indocument
the following
order:
<HTML>
TITLE - Contains your document title &
is displayed in the title bar at the top of
<HEAD><TITLE></TITLE></HEAD>
the browser.
<BODY></BODY>
BODY - Contains the displayed content
</HTML>
of your document.
Lesson
Lesson 11 -- Basics
Basics of
of HTML
HTML
Copyright
Copyright1999,
1999,Pinnacle
PinnacleSoftware
SoftwareSolutions
SolutionsInc.
Inc.
Practice Exercise
Create a minimal HTML document, which is also referred to as a template:
Before we start on our first page, create a folder in which to organize all these
files. Go to Windows Explorer and in the My Documents folder, create a folder
as yourname-html.
1. Open Notepad (or another text-editor)
2. Type in the following:
<HTML>
<HEAD>
<TITLE>MyFirstPage</TITLE>
</HEAD>
<BODY>
Hi...Welcometomywebsite!!
</BODY>
</HTML>
3. Save the document as default.htm in your folder.
4. Open your web browser (Netscape Navigator or Internet Explorer.)
5. Open default.htm in the browser.
-In IE, go to the File Menu, select Open, click on Browse, locate your folder,
and double-click on the file default.htm to open it.
-In Netscape, go to the File Menu, select Open, click on Choose File, locate
your folder, and double-click on the default.htm to open it.
Introduction to HTML
The main HTML tags are required on all HTML documents (with just one
exception which will be covered later). It is a wise practice to create a document
as you have just done in the previous exercise including all of these tags and
then to save the file as template.html. The template can then be opened and
saved as a new document whenever you choose.
Introduction to HTML
Summary
Not a programming language, HTML stands for Hypertext Mark-up Language.
It is used for creating documents for the World Wide Web.
HTML tags are used to mark elements in a document for browsers to display
in a certain format. The popular web browsers support most HTML tags.
Exercises
Introduction to HTML