HTML Introduction (original) (raw)

Last Updated : 08 Nov, 2025

HTML (HyperText Markup Language) is the standard language for creating and structuring web pages using tags and elements. It defines how content like text, images, and links appear in a browser.

My First Webpage

Welcome to My Webpage

This is my first paragraph of text!

`

HTML Elements and HTML Tag

HTML Elements and HTML Tags are related but distinct. An HTML element is the complete structure, including the opening tag, content (if any), and the closing tag (if applicable).

_p_class_text_hello_world_p_

On the other hand, A tag is the actual keyword or name enclosed in angle brackets (< >) that tells the browser what kind of content to expect.

How HTML Works: Understanding Step-by-Step

In this topic, we’ll learn how a simple HTML file is written, saved, opened in a browser, rendered, and finally displayed on the screen along with how CSS and JavaScript enhance it.

[Slide 1]: HTML Page Structure

html_page_structure

[Slide 2]: Saving the File

[Slide 3]: Opening in a Browser

[Slide 4]: Rendering the Page

[Slide 5]: Displaying Content

Let this slide show how the code from Slide 1 looks when run in the browser:

image

Output of Slide1 Image

Interaction of HTML, CSS, and JavaScript

HTML, CSS, and JavaScript work together to create modern web pages. Each plays a unique role - HTML gives structure, CSS adds style, and JavaScript brings interactivity.

How They Work Together

Take a look at the image below to understand how HTML, CSS, and JavaScript work together to build and enhance a webpage.

interaction_with_css_javascript

Let’s understand the concept of HTML, CSS, and JavaScript through the example given below.

HTML `

HTML, CSS and JS Example

Welcome to My Webpage

This structure is built using HTML, styled with CSS, and made interactive with JS.

Click Me

CSS

body { text-align: center; background-color: #eef; }
h2 { color: darkblue; }
button { padding: 10px 20px; background-color: blue; color: white; border: none; cursor: pointer; }

JavaScript

function showMessage() {
  alert("This is JavaScript adding interactivity!");
}

`

HTML Attributes

Attributes provide additional information about an element. They are placed inside the opening tag and are written as name="value". Common attributes include class, id, href, and src.

**Example:

Visit Example

href is an attribute of the tag that defines the URL of the link.

To learn more about it follow the article - HTML Attributes

Also Check:

Introduction to HTML | Complete HTML tutorial