Chapter 010mAI Lab

HTML Introduction — AI Lab

HTML යනු කුමක්ද, HTML Elements ක්‍රියා කරන්නේ කෙසේද සහ සරල උදාහරණ හා පුහුණු අභ්‍යාස භාවිතයෙන් ඔබේ පළමු HTML Document එක සාදා ගන්නේ කෙසේද යන්න ඉගෙන ගන්න.

AI Lab15 min3 prompts

AI රසායනාගාරය — AI සමඟ HTML ඉගෙන ගන්න

HTML කේත උත්පාදනය කිරීමට, පැහැදිලි කිරීමට සහ නිදොස් කිරීමට AI ඵලදායී ලෙස භාවිතා කරන ආකාරය ඉගෙන ගන්න.

AI රසායනාගාරය — AI සමඟ HTML ඉගෙන ගන්න

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?