Basic HTML Tags
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>
HTML Format
Element 1 | Element 2 | Element 3 |
Element 4 | Element 5 | Element 6 |
Example 3
HTML:
<table border=1 width=500>
<tr bgcolor=red><td width=200><b>Element 1</b></td><td width=150>Element 2</td><td width=150>Element 3</td></tr>
<tr><td bgcolor=55ff55>Element 4</td><td>Element 5</td><td><i>Element 6</i></td></tr>
</table>
<table border=1 width=500>
<tr bgcolor=red><td width=200><b>Element 1</b></td><td width=150>Element 2</td><td width=150>Element 3</td></tr>
<tr><td bgcolor=55ff55>Element 4</td><td>Element 5</td><td><i>Element 6</i></td></tr>
</table>
Display:
Element 1 | Element 2 | Element 3 |
Element 4 | Element 5 | Element 6 |
Example 4
HTML:
<table border=1>
<tr><td>Element 1</td><td>Element 2</td><td>Element 3</td></tr>
<tr><td colspan=2>Element 4</td><td>Element 5</td></tr>
</table>
<table border=1>
<tr><td>Element 1</td><td>Element 2</td><td>Element 3</td></tr>
<tr><td colspan=2>Element 4</td><td>Element 5</td></tr>
</table>
Display:
Element 1 | Element 2 | Element 3 |
Element 4 | Element 5 |
Example 5: cellspacing and cellpadding attributes.
HTML:
<table border=1 cellspacing=10 cellpadding=0>
<tr><td>Element 1</td><td>Element 2</td><td>Element 3</td></tr>
<tr><td>Element 4</td><td>Element 5</td><td>Element 6</td></tr>
</table>
<table border=1 cellspacing=10 cellpadding=0>
<tr><td>Element 1</td><td>Element 2</td><td>Element 3</td></tr>
<tr><td>Element 4</td><td>Element 5</td><td>Element 6</td></tr>
</table>
Display:
Element 1 | Element 2 | Element 3 |
Element 4 | Element 5 | Element 6 |
Example 6: cellspacing and cellpadding attributes.
HTML:
<table border=1 cellspacing=0 cellpadding=10>
<tr><td>Element 1</td><td>Element 2</td><td>Element 3</td></tr>
<tr><td>Element 4</td><td>Element 5</td><td>Element 6</td></tr>
</table>
<table border=1 cellspacing=0 cellpadding=10>
<tr><td>Element 1</td><td>Element 2</td><td>Element 3</td></tr>
<tr><td>Element 4</td><td>Element 5</td><td>Element 6</td></tr>
</table>
Display:
Element 1 | Element 2 | Element 3 |
Element 4 | Element 5 | Element 6 |
Example 7: cellspacing and cellpadding attributes.
HTML:
<table border=1 cellspacing=10 cellpadding=10>
<tr><td>Element 1</td><td>Element 2</td><td>Element 3</td></tr>
<tr><td>Element 4</td><td>Element 5</td><td>Element 6</td></tr>
</table>
<table border=1 cellspacing=10 cellpadding=10>
<tr><td>Element 1</td><td>Element 2</td><td>Element 3</td></tr>
<tr><td>Element 4</td><td>Element 5</td><td>Element 6</td></tr>
</table>
Display:
Element 1 | Element 2 | Element 3 |
Element 4 | Element 5 | Element 6 |
HTML LISTS
<ol>
<ul>
<li>
The <li> tag lists each item, whether ordered or numbered. Note that each item is indented.
Example 1: ordered list.
HTML:
<ol>
<li>Apple</li>
<li>Banana</li>
<li>Orange</li>
</ol>
<ol>
<li>Apple</li>
<li>Banana</li>
<li>Orange</li>
</ol>
Display:
- Apple
- Banana.
- Orange
Example 2: unordered list.
HTML:
<ul>
<li>Apple</li>
<li>Banana</li>
<li>Orange</li>
</ul>
<ul>
<li>Apple</li>
<li>Banana</li>
<li>Orange</li>
</ul>
Display:
- Apple
- Banana.
- Orange
Thank you sir giving a such information about Html and also related subjects
ReplyDelete