Sunteți pe pagina 1din 6

What is HTML?

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

HTML Tags
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

HTML Documents = Web Pages


 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
HTML Tags
HTML tags (otherwise known as "HTML elements"), and their
respective attributes are used to create HTML documents so
that you can view them in browsers and other user agents.
Note that not all browsers/user agents support all HTML tags
and their attributes, so you should try to test your pages in
as many browsers as you can.

Complete list of HTML tags

Below is a complete list of HTML tags from the HTML 4.01


specification. The HTML tags are listed alphabetically to help you
quickly find the tag you're looking for (or to find out whether it exists
or not!).

 <!--...-->  <frame>  <p>


 <!doctype>  <frameset>  <param>
 <a>  <h1>  <pre>
 <abbr>  <h2>  <q>
 <acronym>  <h3>  <s>
 <address>  <h4>  <samp>
 <applet>  <h5>  <script>
 <area>  <h6>  <select>
 <b>  <head>  <small>
 <base>  <hr>  <span>
 <basefont>  <html>  <strike>
 <bdo>  <i>  <strong>
 <big>  <iframe>  <style>
 <blockquote>  <img>  <sub>
 <body>  <input>  <sup>
 <br>  <ins>  <table>
 <button>  <isindex>  <tbody>
 <caption>  <kbd>  <td>
 <center>  <label>  <textarea>
 <cite>  <legend>  <tfoot>
 <code>  <li>  <th>
 <col>  <link>  <thead>
 <colgroup>  <map>  <title>
 <dd>  <menu>  <tr>
 <del>  <meta>  <tt>
 <dfn>  <noframes>  <u>
 <dir>  <noscript>  <ul>
 <div>  <object>
 <dl>  <ol>  <var>
 <dt>  <optgroup>
 <em>
 <fieldset>  <option>
 <font>

 <form>

The basic tags include <html>, <title>, <meta>, and <body>. We


introduce each of the four in the following:

<html>
This tag is used to indicate that this is a HTML document. Most HTML
documents should start and end with this tag.

<head>
This tag is used to indicate the header section of the HTML
document, which typically includes the <title> and <meta> tags, and
is not displayed in the main window of the browser.

<title>
This indicates the title of this HTML page. The title is what is
displayed on the upper left corner of your browser when you view a
web page. For example, right now you can see "Basic Tags: html,
head, title, meta, body" there. That is the title of this page.

The title tag is important when it comes to search engine ranking.


Many of the search engines pay special attention to the text in the
<title> tag. This is because (logically) that words in the <title> tag
indicate what the page content is.
<meta>
The <meta> tag information is not directly displayed when the page is
rendered on the browser. Rather, this is used for the author of the
HTML page to record information related to this page. Two common
attributes are name and content. The <meta> tag used to hold great
importance in search engine optimization, with authors carefully
drafting what's inside the tag to gain better search engine ranking, but
recently its importance has been decreasing steadily.

<body>
The <body> tag includes the HTML body of the document. Everything
inside the <body> tag (other than those within the <script> tag) is
displayed on the browser inside the main browser window.

The <body> tag may contain several attributes. The most commonly
used ones are listed below:

 bgcolor: This is the background color of the entire HTML


document, and may be specified either by the color name
directly or by the six-digit hex code.
 alink: The color of the links.
 vlink: The color of the visited links.
 topmargin: The margin from the top of the browser window.
 leftmargin: The margin from the left of the browser window.

So, in general, all HTML documents have the following format:

<html>
<head>
<title>
Here is the title of the HTML document.
</title>
<meta name=" " content=" " />
... (there may be one or more meta tags)
</meta>
</head>
<body>
Here is the body of the HTML document.
</body>
</html>

S-ar putea să vă placă și