What is HTML?
HTML stands for Hyper Text Markup Language. It is the most widely used language on Web to develop web pages. HTML was created by Berners-Lee in late 1991 but "HTML 2.0" was the first standard HTML specification which was published in 1995.
It is collection of tags, by which we can design layout of web page. The main purpose of HTML is to create a website or customize an existing web template. We compose HTML code in Notepad and other available text editor and save it with .html extension name.
What is Tag?
Tag is just like as commmand by which we can insturct to the computer to do some specific task. It is divided in two parts.
1. Container Tag: These types of tag contain some elements between opening and closing tag.
Example:
<tagname>Elements</tagname>
2. Empty Tag: These types of tag do not need closing portion, only opening part.
Example:
<tagname>Elements
Now learn about Tags
<HTML>:
You can start any html code within this tag. The browser does not display the HTML tags, but uses them to determine how to display the document.
The <!DOCTYPE> Declaration:
The declaration represents the document type, and helps browsers to display web pages correctly. It must only appear once, at the top of the page (before any HTML tags). Its declaration is not case sensitive.
The <Head> and <Title> Declaration:
You can declare title of web page in between <Head> and <Title> tag. It represents the document's header which contains other HTML tags like <title>, <link> etc.
The <Body> Tag:
Body tag contains all required tags which are shown on web page. The <body> element contains all the contents of an HTML document, such as text, hyperlinks, images, tables, lists, etc. It has two attributes, bgcolor and background.
* bgcolor: Specify background color for an HTML document:
* background: Specify background image for an HTML document
Example for background color.
<!DOCTYPE html>
<html>
<head>
</head>
<body bgcolor="gray">
<h1>Hello world!</h1>
</body>
</html>
Specify a background image for an HTML document:
<!DOCTYPE html>
<html>
<head>
</head>
<body background="bgimage.jpg">
<h1>Hello world!</h1>
</body>
</html>
Text headers:
There are six different types of text header you can choose from, h1 being the topmost heading with the largest text, and h6 being the most inner heading with the smallest text. In general, you should have only one h1 tag with a page, since it should be the primary description of the HTML page.
<H1> <H2> <H3> <H4> <H5> <H6> | Heading 1 Heading 2 Heading 3 Heading 4 Heading 5 Heading 6 | <H1>Heading 1</H1> <H2>Heading 2</H2> <H3>Heading 3</H3> <H4>Heading 4</H4> <H5>Heading 5</H5> <H6>Heading 6</H6> |
«12345678910»
0 Comments