Introduction To HTML

HTML - Hyper Text Markup Language

HTML is used by browser to manipulate text, images and other content to display it in required format.  HTML is created by Tim Berners-Lee
 
A HTML file can be created by-
  • Text-Editors (Notepad)
  • Atom
  • Sublime-texts
  • Visual Studio Code
eg:
Basic HTML document-

<!DOCTYPE html>   #defines the type of the document.

<html>     #your code start from here.
    <head>   #defines head in html
        <title>MY WEB PAGE</title>  #Defines the web page name.
    </head>    #closing of head.
    
    <body>    #defines the body of a site.                      
        <h1>Here is the heading you want to give</h1>    #To define heading of the page
        <p>Here is the text you want to write in website</p>    #To Write a paragraph in HTML.
    </body>       #Closing of body
 </html>          #closing of HTML

Rules and Definition of Different Keywords-
  • Tags- a html  works on different tags(Opening and Closing tags). Every opening tag has its closing tag.
            <html>    </html>
            <head>   </head>
            <title>    </title>
            <body>   </body>
            <h1>       </h1>
            <p>        </p> 
  • DOCTYPE- to define the document type as html.
  • <head>....</head> - this is head opening and closing tag. All the lines written in here are not shown in the site page.Here all the elements and CSS are defined. title of the page is defined in this section.
  • <title>....</title> - this is title opening and closing tag, here the title of the website is defined. It is always used under the head section.
  • <body>....</body> - this is the body opening and closing  tag. The body of a website is defined in this section. All the lines written in this section are shown in the web page.
  • <h1>....</h1> - this is heading opening and closing tag. There are total of 6 heading tags in HTML( h1, h2, h3, h4, h5, h6). They are used to define heading and subheadings.
  • <p>....<p>- this is paragraph tag with its opening and closing. this tag is used to create a paragraph in a web page.































Comments

Popular posts from this blog

Adding Images in html

Div, Header, Footer and Main