כתיבת HTML
הוצג
21:50
חישוב II: עצב, בנה והסבר אתר
אתר אינטרנט המיועד לתחבורה לבית הספר יכול לעזור לחברים להבין את התוצאה המרכזית ולבדוק את השיטה של המחקר. עמוד שימושי צריך מטרות ברורות, קריאה…
קריינות באנגלית · כתוביות באנגלית ובסינית 中文 שאפשר להחליף ביניהן
בשיעור הזה
| English | משמעות |
|---|---|
| HTML/ˌeɪtʃ tiː em ˈel/ | |
| attribute/ˈætrɪbjuːt/ | תכונה |
| element/ˈelɪmənt/ | אלמנט |
| semantic elements/səˈmæntɪk ˈelɪmənts/ | אלמנטים סמנטיים |
It looks like a link, but Tab skips it
- A styled rectangle saying “Join” is not automatically a working link. A real anchor with a destination has browser behaviour that styling alone does not supply.
- HTML 超文本标记语言 gives content structure and meaning. CSS controls presentation; choosing meaningful HTML also supports keyboard and assistive-technology use.
מדוע להשתמש באלמנט כותרת אמיתי לכותרת דף?
רמת קושי 1/5 · 100 מטבעות + בונוס קטן בהשלמה הראשונה היום
כותרת מתארת את מבנה המסמך. המראה ניתן לשליטה באמצעות CSS.
Read the tag and its attributes
- An element 元素 often has a start tag, content and an end tag:
<p>Meet on Thursday.</p>. An attribute 属性 supplies information in the start tag:<a href="join.html">Join</a>. - An HTML void element such as
imghas no end tag or child content. It does not “close itself”; a trailing slash is unnecessary in HTML. Nest paired tags without crossing them.
איזה מאפיין מעניק לקישור יעד ניווט?
רמת קושי 1/5 · 100 מטבעות + בונוס קטן בהשלמה הראשונה היום
קישור כמו איך הצטרפות משתמש ב-href.
Mark the page regions by purpose
- Semantic elements 语义化元素 include
navfor major navigation andmainfor the page's main content. Use headings to describe sections anddivfor a generic grouping when no more specific element fits. - A native
awithhrefnavigates; a nativebuttonperforms an action. Semantic markup helps, but labels, behaviour and focus still need testing.

איזה אלמנטים יש להם משמעויות HTML ספציפיות אלו? בחר את כל האפשרויות הרלוונטיות.
רמת קושי 2/5 · 140 מטבעות + בונוס קטן בהשלמה הראשונה היום
div הוא אלמנט גנרי. השתמש באלמנט מדויק יותר כאשר המטרה המוגדרת שלו מתאימה.
התאם את המטרה הרצויה לאלמנט מקומי מתאים.
רמת קושי 2/5 · 140 מטבעות + בונוס קטן בהשלמה הראשונה היום
אלמנטים מקומיים מספקים משמעות והתנהגות ברירת מחדל, שעדיין זקוקים לתוויות שימושיות ולבדיקות.
Build a small complete page
- Save this example as
index.htmlbeside a realjoin.html. Open it in a browser and follow the link using Tab and Enter. langidentifies the page language;titlenames the browser tab. The viewport setting lets responsive styles use the device width.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Robotics club</title>
</head>
<body>
<nav aria-label="Main"><a href="join.html">How to join</a></nav>
<main>
<h1>Robotics club</h1>
<p>Meet Thursday at 4 pm in room 12.</p>
</main>
</body>
</html>
<a href="join.html">How to join</a> combines a destination and a useful label. <div class="link">Click here</div> provides neither native navigation nor a destination.
Choose alternatives by the image's purpose
- An informative image needs an alternative conveying its relevant meaning. A purely decorative image normally uses
alt=""so assistive technology can skip it. - For an image used as a link, describe the link's function when that information is not otherwise supplied. A complex chart also needs its important data explained in text.
Do not use headings merely to enlarge text, or repeat “image” as every alternative. Equally, do not give decorative images lengthy descriptions that interrupt the page.
גרף מידע דורש טקסט חלופי שמעביר את המידע המרכזי שלו, ולא רק "תמונה".
רמת קושי 1/5 · 100 מטבעות + בונוס קטן בהשלמה הראשונה היום
נכון. החלופי חייב לספק את המידע הרלוונטי; גרף מורכב עשוי גם לצרוך את הנתונים החשובים בטקסט.
סיפור חדשות במועדון משתמש בתמונה כדי להראות תלמידים שבוטעים עצים בחצר בית הספר. כתוב טקסט חלופי (alt) שימושי.
רמת קושי 3/5 · 200 מטבעות + בונוס קטן בהשלמה הראשונה היום
דוגמה: “תלמידים בוטעים עצים בחצר בית הספר.” אל תמציא מספר שלא סופק.
עיטור קטן לצד כותרת אינו מוסיף מידע. איזה חלופה לתמונה מתאימה בדרך כלל?
רמת קושי 1/5 · 100 מטבעות + בונוס קטן בהשלמה הראשונה היום
חלופה ריקה מאפשרת לטכנולוגיות סיוע לדלג על תמונה דקורטיבית באופן מוחלט.
Verify structure and behaviour
- Check the heading order, meaningful link labels, keyboard use and image alternatives. An HTML validator can detect markup errors, but cannot judge whether your wording is useful.
- Make the meeting page usable with styles turned off. Then style the content without changing headings into appearance-only shortcuts.
Choose HTML by purpose. Use native links and buttons, valid nesting and image alternatives that match the image's role.
Sources: HTML syntax and W3C decorative images.
ב-HTML, אלמנט img הוא אלמנט ריק ואינו אמור להכיל תג סיום.
רמת קושי 1/5 · 100 מטבעות + בונוס קטן בהשלמה הראשונה היום
אלמנטים ריקים אינם מכילים תוכן ילד או תג סיום. קו הברק בסוף אינו נדרש; הוא אינו מעניק לאלמנטי HTML התנהגות של סגירה עצמית.
מה השתבש? רק צוות האתר רואה זאת.