texmith website exit icon
Press enter to confirm search term
basics of html texmith blog
HTML

Basics of HTML Part 2

Texmith website arrow icon

Understanding the meaning before practically working on it will make your work a lot easier. As discussed in the previous lesson, you can use any text editor to create an HTML file, notepad as well.  

Going further with the lesson you’ll understand that HTML works on some certain codes which we call elements and tags. Without providing these your text will not run on any browser. 


<! DOCTYPE html> 
<html> 
<head> 
         <title>  HTML Basics </title> 
</head> 
<body> 
          Includes the main content 
</body> 
</html>  
<!--This is the most important and the initial part of HTML -->  
 
<! DOCTYPE html> 

You call it a doctype declaration. DOCTYPE declaration is a reference to a document type definition. All HTML documents must start with <!DOCTYPE html>. It helps the webpage recognize what version of markup language is being used. It basically defines your HTML document and helps it recognize in the web browser. DOCTYPE html should always come on the top of all the HTML tags, as it should be easier for the web browser to recognize it. 

 

HTML Head     

The HTML head element can consist title for the document, styles, meta data, scripts, link and other. The head container includes all of these and is placed between the <head> tagThe HTML Head includes the general information of the complete HTML file. 

HTML Body 

HTML Body contains the all the main content of the HTML document. The body tag defines the document’s body. Texts, hyperlinks, images, tables, lists, etc. The content in the <body> tag is directly displayed in your web browser. 

So far what we have learnt is,  

    • <!DOCTYPE html> must always be on the top and every HTML document should have doctype html before everything. 
    • HTML Head contains the general information of the HTML document. 
    • Body contains all the main information of the HTML document and will be directly visible in the web browser/web page.  

 

Note: Every element must have a starting <  > tag and a closing </  > tag unless it is a self-closing tag like <br> break 

Interested in working with Us? Drop us a line!