HTML Basics:
Webpages are written in
HTML - a simple scripting language.
HTML is short for HyperText Markup Language.
HTML is short for HyperText Markup Language.
·
Hypertext is simply a
piece of text that works as a link.
·
Markup Language is a way of writing
layout information within documents.
·
Basically
an HTML document is a plain text file that contains text and nothing else.
When a
browser opens an HTML file, the browser will look for HTML codes in the text
and use them to change the layout, insert images, or create links to other
pages. Since HTML
documents are just text files they can be written in even the simplest text
editor.
A more popular choice is to use a special HTML editor - maybe
even one that puts focus on the visual result rather than the codes - a
so-called WYSIWYG editor ("What You See Is What You Get").
Why Learn HTML:
It is
possible to create webpages without knowing anything about the HTML source
behind the page. There are excellent editors
on the market that will take care of the HTML parts. All you need to do is
layout the page.
The most important benefits are:
1.
You can use tags the editor does not support.
2.
You can read the code of other people's pages, and
"borrow" the cool effects.
3.
You can do the work yourself, when the editor simply refuses to
create the effects you want.
All you
need to do is type in the code, then save the document, making sure to put an .html extension or an .htm extension
to the file (for instance "mypage.html").
Tags
Basically, a computer sees an
"A" as simply an "A" - whether it is bold, italic, big or
small.
To tell the browser that an "A" should be bold we need to put a markup in front of the A.
Such a markup is called a Tag.
To tell the browser that an "A" should be bold we need to put a markup in front of the A.
Such a markup is called a Tag.
All HTML tags are enclosed
in < and >.
Example:
a piece of text as it appears on the screen.
|
HTML: the HTML for the above example:
|
As you can see, the start
tag <b> indicates that whatever follows should be written in
bold. The corresponding end tag </b> indicates that the browser
should stop writing text in bold.
Page structure:
All
normal webpages consist of a head and a body.
·
The head is used for text and
tags that do not show directly on the page.
·
The body is used for text and
tags that are shown directly on the page.
Finally, all webpages
have an <html> tag at the beginning and the end, telling the
browser where the document starts and where it stops.
The most basic code - the code you will use for any page you make, is shown below:
The most basic code - the code you will use for any page you make, is shown below:
|
<html>
<head>
<!-- This section is for the title and technical info of the page. -->
</head>
<body>
<! -- This section is for all that you want to show on the page. -->
</body>
</html>
<head>
<!-- This section is for the title and technical info of the page. -->
</head>
<body>
<! -- This section is for all that you want to show on the page. -->
</body>
</html>
No comments:
Post a Comment