HTML Tutorial

How HTML Works in a Web Browser

1 minute

How HTML Works in a Web Browser

  1. Write HTML Code
  2. Browser Reads the Code
  3. Interpret the Tags
  4. Render the Page

 

XHTML (Extensible HyperText Markup Language)

  • XHTML is a stricter and cleaner version of HTML.
  • Introduced in 2000, based on XML rules.

Notes:

  • Tags must always be properly nested.
  • All tags must be closed.
  • Tag names/attributes in lowercase.
  • Attribute values must be in quotes.

Example:

<p>This is valid in XHTML</p>
<br />
<img src="image.jpg" alt="sample image" />

Comments in HTML (<!-- -->)

  • Comments are ignored by the browser.
  • Used for documentation, explanations, or disabling code.

Syntax:

<!-- This is a single-line comment -->

<!--
This is a
multi-line comment
-->

Examples:

<p>Hello World!</p>
<!-- This paragraph displays 'Hello World!' -->

<!-- <p>This paragraph is hidden and won’t show on the page</p> -->

<!-- Header Section -->
<h1>Welcome</h1>
<!-- Footer Section -->
<p>Copyright 2025</p>

OutPut : 

image

 

 

 

 

 

 

Previous
Article 6 of 14
Next