HTML is using tags for its syntax. A tag is made up of special characters: <,> and /.
They are interpreted by software to compose an HTML element.
(Image Source - Google Images)
HTML elements generally come in pairs of tags.
To open a simple element with a start tag
- It starts with <
- Then a list of characters without space, the tag name (or element)
- Ends usually with a >.
Then close the simple element with a final tag
- It starts with </
- Then the same list of characters without space, the tag name (or element)
- Ends usually with a >.
If the tag name is "body", you get<body> </body>
HTML Example
Let's create the first example
<!DOCTYPE html><html><head><title>Page Title</title></head><body><h1>This is a Heading</h1><p>This is a paragraph.</p></body></html>
Save this file as Test.html
Output: This is a Headline
This is a paragraph.
Explanation of HTML Example :
<!DOCTYPE> - Define the document type or instruct the browser on the HTML version.
<html> - This tag informs the browser that it is an HTML document. The text between the HTML tag describes the web document. It is a container for all other HTML elements.
<head> - It must be the first element within the element, which contains the metadata (information about the document). It must be closed before the body tag opens.
<title> - As its name suggests, it is used to add the title of that HTML page that appears at the top of the browser window. It should be placed inside the head tag and closed immediately. (Optional)
<body> - The text between the body tag describes the content of the page body that is visible to the end-user. This tag contains the main content of the HTML document.
<h1> - The text between the <h1> tag describes the first level header of the web page.
<p> - The text between the <p> tag describes the paragraph on the web page.
Features of HTML
A list of the most important features of HTML language is given below :
- It is a very easy and simple language. It can be easily understood and modified.
- It is very easy to make an effective presentation with HTML because it has many formatting tags.
- It is a markup language, so it provides a flexible way of designing web pages alongside text.
- It makes it easier for programmers to add a link to web pages (by Html anchor tag), thereby increasing the interest of user navigation.
- It is platform-independent because it can be displayed on any platform such as Windows, Linux, etc.
- It makes it easier for the developer to add graphics, videos, and sound to web pages, making it more attractive and interactive.
- HTML is a case-insensitive language, which means that we can use lowercase or uppercase tags.

Comments
Post a Comment