2. HTML is a language for describing web pages.
HTML stands for Hyper Text Markup Language
HTML is not a programming language, it is
a markup language
A markup language is a set of markup tags
HTML uses markup tags to describe web pages
3. HTML markup tags are usually called HTML tags
HTML tags are keywords surrounded by angle
brackets like <html>
HTML tags normally come in pairs like <b> and
</b>
The first tag in a pair is the start tag, the second
tag is the end tag
Start and end tags are also called opening
tags and closing tags
4. HTML documents describe web pages
HTML documents contain HTML tags and plain text
HTML documents are also called web pages
The purpose of a web browser (like Internet Explorer or Firefox) is to read HTML documents and
display them as web pages. The browser does not display the HTML tags, but uses the tags to interpret
the content of the page:
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
Example Explained
The text between <html> and </html> describes the web page
The text between <body> and </body> is the visible page content
The text between <h1> and </h1> is displayed as a heading
The text between <p> and </p> is displayed as a paragraph
5. HTML can be written and edited using many
different editors like Dreamweaver and Visual
Studio.
However, in this tutorial we use a plain text
editor (like Notepad) to edit HTML. We believe
using a plain text editor is the best way to learn
HTML.
6. When you save an HTML file, you can use either
the .htm or the .html file extension. There is no
difference, it is entirely up to you.
7. HTML headings are defined with the <h1> to <h6> tags.
Example
<h1>This is a heading</h1>
<h2>This is a heading</h2>
<h3>This is a heading</h3>
Headings Are Important
Use HTML headings for headings only. Don't use headings to make
text BIG or bold.
Search engines use your headings to index the structure and content of your
web pages.
Since users may skim your pages by its headings, it is important to use
headings to show the document structure.
H1 headings should be used as main headings, followed by H2 headings,
then the less important H3 headings, and so on.
8. HTML paragraphs are defined with the <p> tag.
Example
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
Don't Forget the End Tag
Most browsers will display HTML correctly even
if you forget the end tag:
9. Example
<p>This is a paragraph
<p>This is another paragraph
The example above will work in most browsers, but don't
rely on it. Forgetting the end tag can produce unexpected
results or errors.
Note: Future version of HTML will not allow you to skip
end tags.
HTML Line Breaks
Use the <br /> tag if you want a line break (a new line)
without starting a new paragraph:
10. Example
<p>This is<br />a para<br />graph with line breaks</p>
The <br /> element is an empty HTML element. It has no
end tag.
<br> or <br />
In XHTML, XML, elements with no end tag (closing tag)
are not allowed.
Even if <br> works in all browsers, writing <br /> instead
works better in XHTML and XML applications.
11. HTML links are defined with the <a> tag.
Example
<a> href="http://www.w3schools.com">This is a
link</a>
Note: The link address is specified in the href
attribute.
12. Tables are defined with the <table> tag.
A table is divided into rows (with the <tr> tag), and
each row is divided into data cells (with the <td>
tag). td stands for "table data," and holds the
content of a data cell. A <td> tag can contain text,
links, images, lists, forms, other tables, etc.
13. Table Example
<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>
How the HTML code above looks in a browser:
row 1, cell 1row 1, cell 2
row 2, cell 1row 2, cell 2
14. Colors are displayed combining RED, GREEN, and BLUE light.
Color Values
HTML colors are defined using a hexadecimal notation (HEX)
for the combination of Red, Green, and Blue color values
(RGB).
16 Million Different Colors
The combination of Red, Green, and Blue values from 0 to 255,
gives more than 16 million different colors (256 x 256 x 256).
15. If you look at the color table below, you will see
the result of varying the red light from 0 to 255,
while keeping the green and blue light at zero.
16. Color Names Supported by All Browsers
147 color names are defined in the HTML and
CSS color specification (16 basic color names
plus 130 more).
AliceBlue #F0F8FF
17. At My Slied you will find complete
references about tags, colornames,
entities, character-sets, URL
encoding, language codes and more.