HTML Basics

HTML is used to create static web pages
CSS is used to control the style and layout of web pages
JavaScript provides dynamic behavior to web pages

Let’s understand the basic building blocks in HTML to create our web pages.

HTML Documents

HTML documents must start with document type declaration:

A document type declaration (DOCTYPE) is an instruction to the web browser about the markup language which is being used to write current web page. It lets the browser know about the version of or standard of HTML or any other markup language that is being used in the document.

<!DOCTYPE html>
      <h1>TechLearnings Heading</h1>
      <p>TechLearnings Paragraph</p>
HTML Headings

HTML headings are defined by


Heading levels are based upon importance.

defines the most important heading.
defines the least important heading.

<h1>Heading level 1</h1>
<h2>Heading level 2</h2>
<h3>Heading level 3</h3>
HTML JavaScript

As mentioned above, JavaScript makes HTML pages more interactive and dynamic.
To embed JavaScript in HTML pages we use