HTML introduction and structure
HTML Introduction and structure:
HTML versions at a glance:
Version |
year |
HTML |
1991 |
HTML (2.0) |
1995 |
HTML (3.2) |
1996 |
HTML (4.01) |
1999 |
XHTML |
2000 |
HTML (5) |
2014 |
What is HTML?
HTML is a markup language for describing web documents.
The full form of HTML: Hyper Text Markup Language
Markup language refers to a set of markup tags.
HTML documents are created with HTML tags.
HTML page structure:
Below is the structure of an HTML page:
Only content in the <body> section is displayed in the browser.
A very simple HTML document:
Example:
- <!DOCTYPE html>
- <html>
- <head>
- <title>Page title</title>
- </head>
- <body>
- <p>HTML paragraph</p>
- <img src="../images/onlylearn24.png" alt="Only Learn 24 Academy" height="140" width="140">
- </body>
- </html>
Output:
HTML paragraph
Detailed description of the above example:
<! DOCTYPE html> is declared to set the type of document. This refers to the latest version of HTML, HTML5.
The contents between the <html> and </html>
The contents between the <head> and </head> tags provide additional information for the HTML document.
Sets the title / name of the text document between the <title> and </title> tags.
Content between the <body> and </body> tags is displayed on the web page.
The <h3> and </h3> tags create a heading / title of the document. The heading tag emphasizes the importance of the content.
The <img> tag displays different types of images in the browser.
HTML tags:
HTML tags are usually paired. Such as <p> and </p>.
The first tag of the pair is called the opening tag and the second tag is called the closing tag.
The closing tag is written in the same way as the opening tag, in the case of the closing tag only a forward slash (/) is given before the tag name.
<! DOCTYPE> Declaration:
<! DOCTYPE> Sets the type of declaration document and helps a web page display correctly in the browser.
This is the first tag of any web document, meaning you have to type this tag only once before all HTML tags.
There are different types of document types and versions. So in order to display the web page correctly, the browser has to know both the type and the version.
The DOCTYPE declaration is not case-sensitive. Both lowercase and uppercase letters are acceptable.
<!DOCTYPE html>
<!doctype HTML>
Summary of the chapter:
Learned about all versions of HTML
Learned about the structure of the HTML page
Thank You.........
shelleyakter
So nice post, Thank You.
shelleyakter
So nice post,