html, head, body elements

 Hello, today we're going to learn about HTML tags. The <html>, <head>, and <body> tags are used to establish the document's overall structure.

First and foremost,

  • <!DOCTYPE html> : It is the abbreviation of Document Type declaration. This tag provides information about the type and version of HTML. If you skip or miss adding this tag, it will be added dynamically by the browser. You can write it as <!doctype html> since it is not case sensitive.
  • <html> :  All html tags are enclosed inside the opening <html> and closing </html> tag. This tag indicates that every tag inside the opening <html> and closing </html> tag is a html element.
  • <body> : The content we want to display is written inside the body tag. Everything between opening<body> and closing</body> tag will be shown on the main window browser.
  • <head> : The position of the head element is between the opening html and opening body tag. The head element includes the meta-information (information of data) about the html document. This tag include elements such as <title>,<style>,<meta>,<script>, etc. 
    Let's take a look at each of them.
    • <title> :  The document's title is specified between the opening<title> and closing </title> tags. It is mandatory in every html document. We can see the title in the browser's title bar.
    • <style> : This element is used for styling the webpage using CSS (Cascading Style Sheets). We'll go over CSS in more detail in a later article.
    • <meta> : This is where the website's metadata is described. In a nutshell, it's detail about the document data that are not included in the main document. The author, expiration date, material, and keywords of the webpage are all contained in this element. While it is not visible, search engines make use of it for SEO that is Search Engine Optimization.
    • <script> : It is used to add/inject JavaScript to the webpage.

Trick Question: What is the difference between element and tag in html?

Let me know the answers in the comment section 😉

So hope, all these basic elements required for creating an html webpage are clear to you. If you have any questions or concerns about this topic, please leave them in the comments section. 

In the next post, we are going to make our first webpage in html so stay tuned 😃
 

Comments

Popular posts from this blog

CREATING FIRST HTML WEBPAGE

BASICS OF HTML FOR BEGINNERS