In this article, you will learn-
What is HTML TAGS or HTML Commands
HTML is a markup language, these markups are called tags that tell the browser how to display the text on the user screen. In HTML Document tags element make the structure of Webpage and when the user open this code in its browser then these element tells the browser how your website display. All the tags in HTML consist of a start tag and end tag but some elements may behave only start tag. These elements are called the Void element. For example <BR> which is used to break the line.
An HTML element starts with a start tag is also called an opening tag and ends with an end tag is called the closing tag. Some HTML elements have empty content Empty elements are closed in the start tag. Most HTML elements may have some attributes.
For example, a paragraph, which is represented by the p element, would be written as
<p>In the HTML syntax, most elements are written …</p>
What are HTML Tag attributes?
The attributes are the Additional information about that tag which defines the characteristics of an element for example Height, Reference, Color, etc. The Attribute has two parts one is the attribute name and the other is its value. Below us briefly discuses the different attributes in HTML.
The general syntax is as follows:
<tag attribute 1 = “value” attribute 2 = “value” … >
For example :
In HTML you must declare the document type at the very first line before the <HTML> tag. The <!DOCTYPE> declaration tells to the web browser about the version of HTML on this page you used.
In each version of HTML the Declaration of Document type is different. For example
In HTML 5 we declare the document Type as:
<! DOCTYPE html>
in HTML 4.01 Strict we can use all HTML elements and attributes. One restriction is that we can not include any presentational elements. In this version Framesets are not allowed. The document type declaration for HTML 4.01 Strict is as follow:
<! DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN”
In This version we can use all HTML elements and attributes, INCLUDING presentational and deprecated elements (like font). Framesets are not allowed. The document type declaration for HTML 4.01 Transitional is as follow:
<! DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
In This version we can use all HTML elements and attributes, INCLUDING presentational and deprecated elements (like font). In this version we cal also use The Framesets. The document type declaration for HTML 4.01 Frameset is as follow:
<! DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Frameset//EN”
<! DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN”
In the example above, the doctype relates to HTML 4.01 Strict.
< HMTL > and </HTML>Tags
The <HTML> tag is very starting element of the HTML page which is indicate that everything in between <HTML> and </HTML> are HTML code and also indicate the browser that this is an HTML file.
<HEAD> and </HEAD>
The <head> tag is basically container tags that contain some informational tag for browser and Search engine. For example <Title> tag which is not only display on the title bar as the title of page also tells the search engine that is on this page. Head tags also contain some more information about the author, copyright, keywords, etc.
<TITLE> and </TITLE> Tag
<Title> is part of the Head tag. This is written between <Head> and </Head> tag. The title tag is a descriptive tag, it defines the title of the document and also Title tags tell search engines what your page is about. Everything in the title tag is appearing on the title bar. The maximum length of your title must between 20 words. The title appears at the very top of the browser page on the title bar.