Definition: What is HTML?
The HTML code has some basic tag and instruction. Without this tag, it’s not possible to make a web page.
- Anatomy of an HTML element (basic HTML elements)
- HTML File Type
- Tags and Attributes
- Web Browsers
DTD: Document Definition Types
The first line of HTML file is with <!DOCTYPE html>, it’s needed to show set of rule of HTML.
Learn more about DTD – Document Definition Types
Anatomy of an HTML element
- Open tag: The element like “P” wrapped in opening and closing <> angle brackets. Its begins any tag element, same as the above images showed.
- Close tag: The same as the opening tag, except that it includes a forward slash “/” before the element name. A TAG element ends here. Don’t forget to add Close TAG, otherwise, web page looks messy.
- The content: Here content will come, which shows to the user in a webpage. Like upper image showed simple text.
- The element: An opening and closing tag with content comprise called element.
HTML File Type
HTML file type save with “.html” or “html”. Mostly nowadays only “.html” used by developers. Follow this tutorial for more detials – HTML vs HTM.
HTML Tags and Attributes
Let’s see the first one example of HTML web page, then we will see the basic html tags list.
<h1>HTML First Program</h1>
<p>HTML Hello World.</p>
Basic HTML elements
</html>– The HTML document starts and ends with this tag.
</body>– All visible part comes here. Like Heading, paragraph, table,
<h6>Tags – Headings.
<p>Tag – Paragraphs.
This is some basic tags. The list of Tags in HTML very long, we will discuss it another tutorial.
Elements can also have attributes that look like below image:
The Web Browsers are read the HTML file code and display content to users. The browser will not show TAG like <h1>, <p>, <body> etc. Only Content will show to users.
Do comment if any doubt and suggestion for this tutorial.
Note: All example of HTML Basic is in HTML5, if you are using the above version then maybe some method depreciated and if using lover version like HTML4, then some tags not supported.