HTML Tags
As told earlier, HTML is a markup language and makes use of various tags to format the content. These tags are enclosed within angle braces <tag name>.Except few tags, most of the tags have their corresponding closing tags. For example , <html> has its closing tag </html> and <body> tag has its closing tag </body> etc. To learn HTML, you will need to study various tags and understand how they behave, while formatting a textual document. Learning HTML is simple as users have to learn the usage of different tags in order to format the text or images to make a beautiful webpage. World Wide Web Consortium (W3C) recommends to use lowercase tags starting from HTML .
Heading Tags
Any document starts with a heading. You can use different sizes for your headings. HTML also has six levels of headings, which use the elements <h1>, <h2>, <h3>, <h4>, <h5> and <h6>. While displaying any heading, browser adds one blank line before and one blank line after that heading.
Ex :-
<h1>heading 1</h1>
<h2>heading 2</h2>
<h3>heading 3</h4>
<h4>heading 4</h5>
<h5>heading 5</h5>
<h6>heading 6</h6>
The <p> tag offers a way to structure your text into different paragraphs. Each paragraph of text should go in between an opening <p> and a closing </p>
Ex:-
<p> this is the Geeks for learn blog. <p>
Result :-
this is the Geeks for learn blog.
HTML – Text Formatting
Bold Text - Anything that appears within <b> </b> element
Italic Text - Anything that appears within <i> </i> element
Underlined Text - Anything that appears within <u> </u> element
The sup and sub tags were used to present something in superscript (text above the line) or subscript (text below the line) .
HTML – Tables
The HTML tables allow web authors to arrange data like text, images, links, other tables, etc. into rows and columns of cells. <table> <tr> <td> Text </td> </tr> </table>
Table Heading:
Table heading can be defined using tag. This tag will be put to replace tag, which is used to represent actual data cell. Normally you will put your top row as table heading as shown below, otherwise you can use element in any row. Cellpadding and Cell spacing Attributes:
There are two attributes called cellpadding and cell spacing which you will use to adjust the white space in your table cells. The cell spacing attribute defines the width of the border, while cellpadding represents the distance between cell borders and the content within a cell.
Colspan and Rowspan Attributes:
You will use colspan attribute if you want to merge two or more columns into a single column. Similar way you will use rowspan if you want to merge two or more rows.
Tables Backgrounds:
You can set table background using one of the following two ways:
- bgcolor attribute - You can set background color for whole table or just for one
- background attribute - You can set background image for whole table or just for one cell.
You can also set border color also using bordercolor attribute.
HTML offers web authors three ways for specifying lists of information. All lists must contain one or more list elements. Lists may contain:
<ul> - An unordered list. This will list items using plain bullets.
<ol> - An ordered list. This will use different schemes of numbers to list your items.
<dl> - A definition list. This arranges your items in the same way as they are arranged in a dictionary.
HTML Unordered Lists:
An unordered list is a collection of related items that have no special order or sequence. This list is created by using HTML tag. Each item in the list is marked with a bullet.
HTML – Images
Images are very important to beautify as well as to depict many complex concepts in simple way on your web page. This tutorial will take you through simple steps to use images in your web pages.
You can insert any image in your web page by using <img> tag. Following is the simple syntax to use this tag.
<img src="image_url/path" />
Set Image Width/Height - You can set image width and height based on your requirement using width and height attributes. You can specify width and height of the image in terms of either pixels or percentage of its actual size.
HTML – Text Links
A webpage can contain various links that take you directly to other pages and even specific parts of a given page. These links are known as hyperlinks. Hyperlinks allow visitors to navigate between Web sites by clicking on words, phrases, and images. Thus you can create hyperlinks using text or images available on a webpage.
Linking Documents - A link is specified using HTML tag <a>. This tag is called anchor tag and anything between the opening <a> tag and the closing </a> tag becomes part of the link and a user can click that part to reach to the linked document. Following is the simple syntax to use <a> tag.
Ex:-
<a href="http://www.geeksforearn.blogspot.com">Geeks</a>
As above example , when we click on the name "Geeks" , we can go the blog directly.
Post a Comment