What is Html and How It Works
HTML stands for HyperText Markup Language. It is the standard language used to create and structure content on the web.
What HTML Does
HTML is not a programming language; it is a markup language. It tells a web browser how to display content like:
- Text
- Images
- Links
- Buttons
- Forms
- Videos
How HTML Works
-
Structure with Tags: HTML uses tags to wrap content and define its role.
- Example:
<p>Hello, world!</p>means “display this text as a paragraph.”
- Example:
-
Hierarchy: HTML documents have a tree-like structure, starting with:
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html> -
Rendered by Browsers: A web browser (like Chrome or Firefox) reads this HTML file and renders it into a visual webpage.
-
Combines with CSS and JavaScript:
- CSS (Cascading Style Sheets) handles how things look.
- JavaScript handles behavior and interaction.
Example
<!DOCTYPE html>
<html>
<head>
<title>My First Page</title>
</head>
<body>
<h1>Welcome!</h1>
<p>This is a simple webpage using HTML.</p>
</body>
</html>
When opened in a browser, this code shows a heading and a paragraph.
Iframe sync
Comments
Post a Comment