Chapter 010mAI Lab

HTML Introduction — AI Lab

ਜਾਣੋ ਕਿ HTML ਕੀ ਹੈ, HTML Elements ਕਿਵੇਂ ਕੰਮ ਕਰਦੇ ਹਨ ਅਤੇ ਸਧਾਰਨ ਉਦਾਹਰਨਾਂ ਤੇ ਅਭਿਆਸਾਂ ਦੀ ਮਦਦ ਨਾਲ ਆਪਣਾ ਪਹਿਲਾ HTML Document ਕਿਵੇਂ ਬਣਾਇਆ ਜਾਂਦਾ ਹੈ।

AI Lab15 min3 prompts

AI ਲੈਬ — AI ਨਾਲ HTML ਸਿੱਖੋ

HTML ਕੋਡ ਜਨਰੇਟ, ਸਮਝਾਉਣ ਅਤੇ ਡੀਬਗ ਕਰਨ ਲਈ AI ਨੂੰ ਪ੍ਰਭਾਵਸ਼ਾਲੀ ਢੰਗ ਨਾਲ ਵਰਤਣਾ ਸਿੱਖੋ।

AI ਲੈਬ — AI ਨਾਲ HTML ਸਿੱਖੋ

ਇਸ AI ਲੈਬ ਵਿੱਚ ਤੁਸੀਂ HTML ਕੋਡ ਲਿਖਣਾ, ਸਮਝਣਾ ਅਤੇ ਡੀਬਗ ਕਰਨਾ AI ਪ੍ਰਭਾਵਸ਼ਾਲੀ ਢੰਗ ਨਾਲ ਵਰਤਣਾ ਸਿੱਖੋਗੇ।

Prompt Lessons

01

ਬੇਸਿਕ HTML ਪੇਜ ਜਨਰੇਟ ਕਰੋ

easygenerate

AI ਨੂੰ ਇੱਕ ਸਿਰਲੇਖ, ਹੈਡਿੰਗ ਅਤੇ ਪ੍ਹੇਰੇ ਨਾਲ ਪੂਰਾ HTML5 ਦਸਤਾਵੇਜ਼ ਜਨਰੇਟ ਕਰਨ ਲਈ ਕਹੋ।

You will learn
ਢਾਂਚਾ, ਸਮੱਗਰੀ ਅਤੇ HTML5 ਮਿਆਰਾਂ ਨੂੰ ਨਿਰਧਾਰਿਤ ਕਰਨ ਵਾਲਾ ਸਪਸ਼ਟ ਪ੍ਰੋਂਪਟ ਲਿਖਣਾ ਸਿੱਖੋ।
Prompt
Try with AI
ਹੇਠਾਂ ਦਿੱਤੀਆਂ ਲੋੜਾਂ ਨਾਲ ਇੱਕ ਵੈਧ HTML5 ਦਸਤਾਵੇਜ਼ ਬਣਾਓ। ਪੂਰਾ HTML ਦਸਤਾਵੇਜ਼ ਵਾਪਸ ਕਰੋ।

ਇਹ ਪ੍ਰੋਂਪਟ ਚੰਗੀ ਤਰ੍ਹਾਂ ਕੰਮ ਕਰਦਾ ਹੈ ਕਿਉਂਕਿ ਇਹ ਦਸਤਾਵੇਜ਼ ਕਿਸਮ, ਸਟੀਕ ਸਮੱਗਰੀ ਲੋੜਾਂ ਅਤੇ ਸਹੀ ਢਾਂਚੇ ਨੂੰ ਨਿਰਧਾਰਿਤ ਕਰਦਾ ਹੈ।

Expected Output

A complete, valid HTML5 document with proper structure.

Example Output

<!DOCTYPE html>
<html lang="en">
<head>
  <title>My First Web Page</title>
</head>
<body>
  <h1>Welcome to HTML</h1>
  <p>HTML (HyperText Markup Language) is the standard language for creating web pages.</p>
</body>
</html>

Why it works

The prompt is structured, specific, and lists requirements as a checklist.

Common Mistakes

  • Not specifying HTML5 — AI may use HTML4
  • Vague instructions like "make a page"
  • Missing the DOCTYPE requirement

Verification Checklist

  • Has <!DOCTYPE html>
  • Has <html>, <head>, <body> tags
  • Title is in <head>
  • Content is in <body>
  • Valid HTML5 syntax

Follow-up Prompts

  1. Add a navigation menu
  2. Include CSS styling
  3. Add an image
02

AI ਨਾਲ HTML ਐਲੀਮੈਂਟਸ ਨੂੰ ਸਮਝਣਾ

easyexplain

HTML ਕੋਡ ਪੇਸਟ ਕਰੋ ਅਤੇ AI ਨੂੰ ਹਰ ਐਲੀਮੈਂਟ ਕੀ ਕਰਦਾ ਹੈ ਸਮਝਾਉਣ ਲਈ ਕਹੋ।

You will learn
AI ਨੂੰ ਉਦਾਹਰਣਾਂ ਨਾਲ ਕੋਡ ਸਪਸ਼ਟ ਕਰਨ ਲਈ ਕਹਿਣਾ ਸਿੱਖੋ।
Prompt
Try with AI
ਇਸ HTML ਕੋਡ ਨੂੰ ਮੈਨੂੰ ਸਮਝਾਓ।

This prompt works because it asks AI to break down each element, explain its purpose, and list attributes.

Expected Output

A clear, element-by-element breakdown of the HTML code with explanations.

Example Output

AI would explain: <div> is a container, <header> is the page header, <nav> contains navigation links, <main> holds primary content, <article> represents a self-contained post.

Why it works

The prompt includes the actual code to explain and asks for a structured breakdown.

Common Mistakes

  • Asking "what is HTML?" without providing code
  • Not specifying what aspects to explain

Verification Checklist

  • AI explains each element
  • Explanations are clear
  • Attributes are mentioned
  • Context is explained

Follow-up Prompts

  1. How do I make this responsive?
  2. What CSS would style this?
03

AI ਨਾਲ HTML ਗਲਤੀਆਂ ਡੀਬਗ ਕਰੋ

mediumdebug

AI ਨੂੰ ਟੁੱਟਾ HTML ਕੋਡ ਅਤੇ ਗਲਤੀ ਵੇਰਵਾ ਦਿਓ, ਫਿਰ ਸਮੱਸਿਆ ਲੱਭਣ ਅਤੇ ਠੀਕ ਕਰਨ ਲਈ ਕਹੋ।

You will learn
AI ਨੂੰ ਪ੍ਰਭਾਵਸ਼ਾਲੀ ਢੰਗ ਨਾਲ HTML ਡੀਬਗ ਕਰਨ ਲਈ ਲੋੜੀਂਦਾ ਸੰਦਰਭ ਦੇਣਾ ਸਿੱਖੋ।
Prompt
Try with AI
ਮੇਰਾ HTML ਪੇਜ ਠੀਕ ਤਰ੍ਹਾਂ ਨਹੀਂ ਵੇਖਾ ਰਿਹਾ।

This debug prompt works well because it provides: the actual code, a description of what's wrong, and specific symptoms. AI can match symptoms to common causes.

Expected Output

AI identifies: missing alt attribute on img, and missing https:// in the href. Provides corrected code.

Example Output

<img src="photo.jpg" alt="My Photo">
<a href="https://www.google.com">Search</a>

Why it works

Providing both the code AND the observed symptoms gives AI maximum context to diagnose the issue.

Common Mistakes

  • Saying "my code is broken" without showing the code
  • Not describing what "broken" means
  • Not providing error messages

Verification Checklist

  • AI identifies both errors
  • Corrected code is provided
  • Explanations for each fix
  • Code is valid HTML5

Follow-up Prompts

  1. How do I add more images?
  2. How do I create a navigation bar?