Lesson 1: What is HTML?

0
1Кб

Objective of the Lesson:

By the end of this lesson, students will understand what HTML is, why it is important in web development, how it fits within the web development stack, and how to structure a basic webpage.


1. Definition of HTML

HTML (HyperText Markup Language) is the standard language used to create and design web pages. It uses a system of tags to define the structure and content of a webpage. HTML tells the web browser how to display text, images, links, videos, and other elements on the page.


2. Purpose and Importance of HTML in Web Development

HTML is the foundational technology for building websites. Here's why it's important:

  • Structure and Content: HTML organizes content on the web into headings, paragraphs, lists, links, images, and other elements, making it easier for both developers and users to understand the layout of a webpage.
  • Accessibility: HTML ensures that web content is accessible to users, including those who rely on screen readers or other assistive technologies.
  • Web Browser Compatibility: Every web browser (Chrome, Firefox, Safari, etc.) reads HTML files, which makes it universally supported.
  • SEO and User Experience: Well-structured HTML is essential for search engine optimization (SEO) and contributes to a better user experience.

3. Overview of How HTML Fits in the Web Development Stack

HTML is the backbone of every website. It is the first layer of the web development stack. Here's how it fits:

  • Frontend: HTML is part of the frontend stack, which includes CSS (for styling) and JavaScript (for interactivity).
  • Backend: While HTML focuses on the content and structure, server-side technologies (e.g., PHP, Node.js) handle backend operations like databases, authentication, and server-side logic.
  • Web Development Workflow: HTML works alongside CSS and JavaScript to create the final user interface that people interact with when they visit a website.

4. Introduction to the Basic Structure of a Webpage

A simple webpage is built using the basic structure of HTML tags. Here's how a typical HTML document looks:

html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My First Webpage</title> </head> <body> <h1>Welcome to My First Webpage</h1> <p>This is a simple webpage built with HTML!</p> </body> </html>

Explanation of the Basic Tags:

  • <!DOCTYPE html>: Defines the document type and version of HTML.
  • <html>: Root element of the HTML document.
  • <head>: Contains metadata about the page (e.g., title, character encoding, etc.).
  • <meta>: Provides information about the page, such as the character set and viewport settings for responsive design.
  • <title>: Sets the title of the webpage, which appears in the browser tab.
  • <body>: Contains the content of the webpage visible to the user.
  • <h1>: A top-level heading. You can use <h2>, <h3>, etc., for smaller headings.
  • <p>: A paragraph element used to define text content.

5. Hands-On Activity: Try the Code

Now, let's practice what we've learned by writing the HTML code and running it in your browser.

Steps to try the code:

  1. Open any text editor (e.g., Notepad, Sublime Text, VS Code).
  2. Copy and paste the following code:
html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My First Webpage</title> </head> <body> <h1>Welcome to My First Webpage</h1> <p>This is a simple webpage built with HTML!</p> </body> </html>
  1. Save the file with a .html extension (e.g., my_first_webpage.html).
  2. Open the file in your web browser by double-clicking on it. You should see a webpage with a heading and a paragraph.

6. Key Points to Remember

  • HTML is the structure of a webpage.
  • Tags are used to define content like text, images, links, and more.
  • The basic HTML structure includes the <!DOCTYPE html>, <html>, <head>, and <body> tags.
  • HTML works together with CSS and JavaScript to build a complete webpage.

7. Next Steps

  • Learn about more HTML tags such as links (<a>), images (<img>), and lists (<ul>, <ol>, <li>).
  • Experiment with creating more complex HTML pages by adding other content like images, links, and embedded media.

8. Homework Assignment

Create a personal webpage that includes the following:

  • A heading with your name.
  • A paragraph introducing yourself.
  • A link to your favorite website.
  • An image of something you like (you can use any image you find online).

Submit your HTML file for review.

Lesson 2: Setting up Your First HTML Document

Поиск
Категории
Больше
News
Mahakumbh 2025: महाकुंभ 2025: आस्था व सांस्कृतिक धरोहर और रोजगार का महासंगम
महाकुंभ मेला भारत की सांस्कृतिक और आर्थिक समृद्धि का प्रतीक है। 13 जनवरी से 26 फरवरी 2025 तक...
От News & Updates 2025-01-18 12:00:59 0 1Кб
Образование
Click Fraud in Google Ads - Detect, Prevent & Protect Your Budget
In the fast-paced world of digital advertising, Google Ads remains a cornerstone for...
От teamtrendzza 2024-12-23 09:17:01 0 2Кб
Sports
India Vs England 1st T20I Abhishek Sharma blitzkrieg powers India to seven-wicket win in Kolkata
India kicked off the T20I series against England in style, clinching a commanding seven-wicket...
От Sports Spotify 2025-01-24 08:07:24 0 858
Образование
What Are the Different Types of Digital Marketing Agencies?
Digital marketing has evolved into a multifaceted field with various specialized agencies...
От Raunak 2024-11-23 07:15:22 0 2Кб
Игры
Tekken 7 by (Bandai Namco Entertainment)
“Taken 7” is often mistakenly referred to due to its phonetic similarity to the...
От Gaming 2025-01-25 12:29:15 0 673