Creating your first html page

HTML page structure

  1. As we have already discussed, every HTML page is divided into two section -:
    1. Head Section
    2. Body Section
  2. Head section
    1. This is a section which is actually not visible to the users on the web page, but it helps the content how to display the content.
    2. It is used to write the title, meta, script, style etc.
  3. Body Section
    1. This is a section which is actually visible on the web page.

Example-1

<!doctype html>
<html>
          <head>
                      <title>My First Web page</title>
          </head>
         <body>
                     Welcome!!! in the world of web.
          </body>  
</html>

Example Explained: 


  1.  <!doctype html> reprents, which html version you are using. For html-5 doctype is as written. Before html-5 doctype is too complicatd. HTML-5 simplified doctype.
  2. Every HTML page starts with <html></html> tag.
  3. Because each HTML page have head section and body section, which is represented by <head></head> and <body></body> tag respectively.
  4. <head></head> section contains, <title></title> tag, which reprents the page title, shown on the title bar.
  5. <body></body> tag contains the actual content of the page.

Run the web page

  1. To run the web page, save your web page with the .html extension, suppose you saved above page as first.html.
  2. To run the web page, open your saved page in the browser.

Comments

Popular posts from this blog

String in golang

Arrays in C Language

Literals in Java

Pointers in C Language

Inline V/S Block Level Element

Reserved Words in Java

Identifiers

Data Types in Go language

Printing in C programming

Variable Naming & Scope of Variable