Egypt › Secondary › First Secondary Grade › Programming and Artificial Intelligence › Unit ١٣: Generative AI

Lesson ٥: Creating an Interactive Web Page

First Secondary GradeProgramming and Artificial IntelligenceSecond Termالدرس ٥٣٠ دقيقة

فيديو الشرح

الفيديو قيد الإنتاج، وسيظهر هنا فور اعتماده.

ماذا ستتعلم؟

اختبر استعدادك أولًا

١. In the question "What three languages does an interactive page need?" the options are: ١) HTML, CSS and JavaScript ٢) HTML only ٣) CSS only ٤) SQL and DNS. What is the number of the correct answer?
٢. In the question "What should an interactivity prompt describe?" the options are: ١) Only colors ٢) The events and the responses wanted ٣) Only fonts ٤) Nothing. What is the number of the correct answer?
٣. In the question "Give an example of an event and response pair." the options are: ١) When the sun rises, the page sleeps ٢) When the printer prints, the screen sings ٣) When the button is clicked, the correct answer appears ٤) No pair exists. What is the number of the correct answer?

الشرح خطوة بخطوة

Level ١: We explore together

Lesson topic: Creating an Interactive Web Page. Now we use AI to build an interactive page that responds to the visitor.

The story: We ask the AI for HTML, CSS and JavaScript together, describing what should happen when the visitor acts. A good prompt for interactivity describes the events and the responses, like: when the button is clicked, show the answer. After saving the code we test every button and box ourselves before sharing the page. If something does not respond, we tell the AI exactly what failed and ask for a fix. In this lesson we learn to create and test an interactive page with AI help.

أخطاء شائعة وتصحيحها

أمثلة محلولة متدرجة

Easy · مثال ١

Which three languages work together in an interactive page?

  1. نقرأ السؤال معًا بهدوء.
  2. Build, style, behavior.
الإجابة: HTML, CSS and JavaScript
Easy · مثال ٢

What should an interactivity prompt describe?

  1. نقرأ السؤال معًا بهدوء.
  2. Events and ...
الإجابة: The events and the responses wanted
Easy · مثال ٣

What is debugging?

  1. نقرأ السؤال معًا بهدوء.
  2. Find and ...
الإجابة: Finding and fixing mistakes in the code
Medium · مثال ٤

Write a prompt for an interactive page with one button that shows a joke when clicked.

  1. نقرأ السؤال معًا بهدوء.
  2. Event plus response.
الإجابة: Example: create an interactive page with a heading and one button labeled show the joke; when the button is clicked, display a short joke below it; use a fun colorful style
Medium · مثال ٥

Why must we test every button ourselves even if the code looks correct?

  1. نقرأ السؤال معًا بهدوء.
  2. Behavior can hide bugs.
الإجابة: Because a page can look fine while its behavior fails, and only real testing proves it responds correctly
Medium · مثال ٦

A button shows the wrong answer. Write the exact message you would send the AI.

  1. نقرأ السؤال معًا بهدوء.
  2. What failed and expected.
الإجابة: Example: the check button shows the answer of question ٢ when I click it on question ١; please make the button show the answer of its own question
Medium · مثال ٧

Order the steps: test the page, write the prompt, fix with AI help, get the code.

  1. نقرأ السؤال معًا بهدوء.
  2. Prompt, code, test, fix.
الإجابة: Write the prompt, get the code, test the page, fix with AI help
Advanced · مثال ٨

Design an interactive quiz page with three questions: describe the events, the responses, and your testing checklist.

  1. نقرأ السؤال معًا بهدوء.
  2. Click, check, score.
الإجابة: Events: the visitor answers each question and clicks check, then clicks score. Responses: each check shows right or wrong, and score shows the total. Testing checklist: every check button gives correct feedback; the score counts correctly; the page works after refreshing
Error analysis · مثال ٩

Your friend says: "If the page looks good, it must work correctly." Is this correct?

  1. نقرأ السؤال معًا بهدوء.
  2. Looks versus behavior.
الإجابة: Wrong, appearance and behavior are separate; a good-looking page can still have broken logic

الخريطة الذهنية

Creating an Interactive Web PageUnit ١٣: Generative AI
▼
HTML, CSS and JavaScriptWhat three languages does an interactive page need?
The events and the responses wantedWhat should an interactivity prompt describe?
When the button is clicked, the correct answer appearsFrom the lesson questions
Test every button and box ourselvesWhat must we do after saving the interactive code?

إنفوجرافيك: Lesson map: words of the day

Lesson map: words of the day
اضغط على أي صف لترى الفكرة.
The key ideas of the lesson in order
We review the questions after one day, then after three days

تدريبات متنوعة مع الإجابات والتفسير

اكتب الإجابة أو اختر ثم اضغط. بعد كل سؤال يظهر الحل مع التفسير.

A) I choose the answer

١. From the lesson explanation: What must we do after saving the interactive code?
٢. The answer "SQL and DNS" to the question "What three languages does an interactive page need?" is correct.
٣. From the lesson explanation: After saving the code we test every button and box ourselves before sharing the page.
٤. The answer "A one-question quiz with a check button" to the question "What is an example of a small interactive page?" is correct.
٥. The answer "When the printer prints, the screen sings" to the question "Give an example of an event and response pair." is correct.
٦. The answer "Show a hint for the question" to the question "Complete the prompt: when the visitor clicks the hint button, ..." is correct.
٧. Which question has the answer "Because behavior can fail even when the page looks fine"?
٨. From the lesson explanation: In this lesson we learn to create and test an interactive page with AI help.

B) I practice and answer

١. The answer "Delete it" to the question "What must we do after saving the interactive code?" is correct.
٢. Which question has the answer "HTML, CSS and JavaScript"?
٣. From the lesson explanation: What should an interactivity prompt describe?
٤. The answer "The events and the responses wanted" to the question "What should an interactivity prompt describe?" is correct.
٥. Which question has the answer "The human maker"?
٦. From the lesson explanation: Who tests the page before sharing?
٧. From the lesson explanation: Complete the prompt: when the visitor clicks the hint button, ...
٨. The answer "Only colors" to the question "What should an interactivity prompt describe?" is correct.

C) I review and play

١. From the lesson explanation: Now we use AI to build an interactive page that responds to the visitor.
٢. The answer "The mouse" to the question "Who tests the page before sharing?" is correct.
٣. Which question has the answer "The events and the responses wanted"?
٤. The answer "It is not important" to the question "Why is testing interactive pages extra important?" is correct.
٥. From the lesson explanation: Why is testing interactive pages extra important?
٦. The answer "HTML, CSS and JavaScript" to the question "What three languages does an interactive page need?" is correct.
٧. Which question has the answer "Test every button and box ourselves"?
٨. The answer "Nothing" to the question "If a button does nothing, what do we tell the AI?" is correct.

ملخص صوتي وقارئ الدرس

قارئ تجريبي يعمل بصوت جهازك (مجاني). ليس تسجيلًا احترافيًا، وجودة الصوت العربي تختلف من جهاز لآخر. التسجيل الصوتي الاحترافي لم يُنتج بعد.

Lesson topic: Creating an Interactive Web Page. Now we use AI to build an interactive page that responds to the visitor.

We review the key points of the lesson: What three languages does an interactive page need? -> HTML, CSS and JavaScript; What should an interactivity prompt describe? -> The events and the responses wanted.

We apply what we learned by answering these questions: What three languages does an interactive page need? -> HTML, CSS and JavaScript; What should an interactivity prompt describe? -> The events and the responses wanted; Give an example of an event and response pair. -> When the button is clicked, the correct answer appears.

مسار المراجعة للامتحان

  1. Day one (١٠ minutes): We read levels ١ to ٣ together, then solve exercises (A).
  2. Day two (١٠ minutes): We play the level ٤ games and solve exercises (B).
  3. Day three (١٠ minutes): Exercises (C), then the Level One test.
  4. Before the school exam: We repeat the Level Three test and look at the common mistakes.

اختبارات بثلاثة مستويات

Level One Test: The Basics

٨ أسئلة. اجب ثم اضغط «أنهِ الاختبار» لترى درجتك.

١. The answer "HTML only" to the question "What three languages does an interactive page need?" is correct.
٢. The answer "Print it" to the question "What must we do after saving the interactive code?" is correct.
٣. The answer "Close the browser" to the question "Complete the prompt: when the visitor clicks the hint button, ..." is correct.
٤. The answer "A photo only" to the question "What is an example of a small interactive page?" is correct.
٥. The answer "Share it untested" to the question "What must we do after saving the interactive code?" is correct.
٦. The answer "A blank page" to the question "What is an example of a small interactive page?" is correct.
٧. The answer "Adding colors" to the question "What is debugging in simple words?" is correct.
٨. The answer "No pair exists" to the question "Give an example of an event and response pair." is correct.

المصادر والحقوق

رمز QR هذه الصفحة. يفتح درس «Lesson ٥: Creating an Interactive Web Page» نفسه.