Module 1: Introduction to HTML
What is HTML and Its Importance
HTML (HyperText Markup Language) is the standard language used to create web pages. It structures content on the web using tags and attributes, enabling browsers to render text, images, links, and other media.
Importance:
Provides the backbone for websites.
Enables interactivity by integrating with CSS and JavaScript.
Defines the semantics of web content for accessibility and SEO.
HTML History and Versions
HTML was first introduced in 1991 by Tim Berners-Lee. Here's a brief timeline:
HTML 1.0 (1993): Basic markup tags.
HTML 2.0 (1995): Introduced forms and tables.
HTML 4.01 (1999): Added support for scripting.
XHTML (2000): XML-based HTML.
HTML5 (2014): Modernized web capabilities with multimedia and APIs.
Basic HTML Structure
An HTML document consists of essential tags:
html
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>Hello, World!</h1> </body> </html>
<!DOCTYPE html>: Specifies the document type.
<html>: Root element.
<head>: Metadata (title, styles, etc.).
<body>: Visible content.
Writing Your First HTML Document
Setup: Open a text editor (e.g., Notepad, VS Code).
Code:
html
<!DOCTYPE html> <html> <head> <title>My First HTML</title> </head> <body> <h1>Welcome to HTML</h1> <p>This is my first web page.</p> </body> </html>
Save: Save the file as index.html.
View: Open in a browser.
Practical Exercises
Exercise 1: Basic HTML Document
Create an HTML file.
Add a heading, paragraph, and title.
Exercise 2: Adding More Elements
Create a list (<ul> or <ol>).
Add an image (<img>).
Insert a link (<a>).
Exercise 3: Experiment with Tags
Try using <div>, <span>, and <br>.
Modify your content and observe changes in the browser.



No comments:
Post a Comment