HTML Tag is a standard language that is used to present the web content. There are many tags in HTML that make the web content nice and attractive. Any HTML tag is started by using less than symbol (<) and is ended by greater than symbol (>). The name of the tag is to keep in the middle of a less than symbol and greater than symbol. Such as, <h1></h1>, <p></p>,<b></b>, <div></div> etc here h1 has come twice, which means of the tag of HTML have to write such a pair. Then there are some tag that has to write in a single. These are called single tag. Such as <img/>, <br/>, <hr/>, <input/> etc.
Firstly which h1 writing has been coming, it is called start tag or opening tag and secondly Which h1 writing has been coming, it is called ending or closing tag. You will see a slash symbol before the name of end tag if you notice. So, you must use slash symbol before the name of end tag when you write tag. It is the main difference between the start tag and end tag. While writing a tag an important characteristic or rules you should keep in mind that, there will be no blank space in the middle of the first and last tag. There is an example below; you will get a clear idea about the subject by seeing it.
<p>This is a paragraph</p>.
Here the text of the middle in opening tag and the closing tag is the subject of element or tag that is executed in the browser. The tag never executes in the browser. Only the tag of in content is executed. Which means content can be executed different way using different HTML tag. Such as with tag contents in the shape of the paragraph, <i></i> tag contents in the shape of italic, <b></b> tag contents in the shape of bold can be executed. The names of tag are not case sensitive and those can be written in capital letter or small letter which means mix case. These can be written in small letters usually.
Note: Slash and Backslash X HTML tag and URL both use slash character. Generally Slash character is found in the below of question mark in the keyboard qwerty. It is very easy to confuse about slash and Backslash. Backslash is found in the below of bar character. Backslash symbol will not do any work in a tag or URL. So, you have to be aware while using slash and backslash.
Element is the main center of HTML. It describes every part of the HTML page. The element is made of a tag. HTML element exists in many stairs. You will see paragraph, text, Link, Banner, Navigation, table and also many things on a web page before your eyes are the elements of that page. An element consists of three main parts-
- Starting tag/opening tag.
- Element content.
- Ending tag/Closing tag.
There are four elements which are very necessary in every element they are HTML, head, title and body.
HTML Element: HTML element has to write first to make a web page. Example: <html>Welcome to Bangladesh</html>
Head Element: <Head> element gives a basic idea about a document or web page. It shows header part of a web page. Example: <head><title>Page Title</title><head>
Title element: <Title> element has to keep in the middle of the head element. Those words are written in the middle of opening tag of title element that words are executed in that page as a title of in the browser. Example: <title>html code</title>
Body element: <Body> element contains all the subjects execute in the web page. All the subjects that we want to show on the web page has to keep in the middle of the body element tag. Example: <body>In the middle of body tag all content will display</body>
The syntax of an empty element is slightly different from HTML and (X) HTML. Empty element does not use a closing tag in HTML. They are identified only by a single tag. For example: br, hr, link, img, li, etc. Also other empty element which provides information about the document it does not have any effect on the content displayed. For example: <meta/> element. Some self-closing elements are given below.