Make it a real page · הפוך את זה לדף אמיתי
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · עמוד זה דורש דפדפן עדכני (תומך ב-SharedArrayBuffer). אנא עדכן את Chrome, Edge, Firefox או Safari לגרסה העדכנית ביותר.
English
A real web page
- So far you wrote pieces of HTML. A full page wraps them in a frame.
- That frame is almost the same on every web page in the world.
- Let's meet it once — then it becomes a habit.
עברית
דף אינטרנט אמיתי
- עד כן כתבת חלקים של HTML. עמוד מלא עוטף אותם במסגרת.
- מסגרת זו זהה כמעט בכל עמוד אתר בעולם.
- בוא נפגוש אותה פעם אחת — ואז תהפוך להרגל.
English
The four parts
<!DOCTYPE html>— the first line. It says: this is modern HTML.<html>— wraps the whole page.<head>— hidden information about the page (like its<title>).<body>— everything you see on the page.
עברית
ארבעת החלקים
<!DOCTYPE html>— השורה הראשונה. היא אומרת: זהו HTML מודרני.<html>— עוטף את כל העמוד.<head>— מידע נסתר על העמוד (כמו ה-<title>שלו).<body>— כל מה שאתה רואה בעמוד.
Explore · חקור
The page skeleton as a tree · שלד הדף כעץ
Every page is a tree: <html> holds <head> (setup) and <body> (what you see). · כל דף הוא עץ: <html> מחזיק ב-<head> (הגדרות) ו-<body> (מה שרואים).
<!DOCTYPE html>
<html>
<head>
<title>My first page</title>
</head>
<body>
<h1>Hello!</h1>
<p>This is a real web page.</p>
</body>
</html>
English
The title shows in the tab
- The
<title>does not appear on the page itself. - It is the name shown on the browser tab and in search results.
- Every page should have one.
עברית
הכותרת מוצגת בתבנית
- ה-
<title>לא מופיע בעמוד עצמו. - הוא השם המוצג בתבנית הדפדפן ובתוצאות החיפוש.
- לכל עמוד צריך להיות אחד.
English
Common mistakes
- A page needs
<html>, a<head>and a<body>. - The tab title comes from
<title>inside<head>.
עברית
טעויות נפוצות
- לעמוד דרושים
<html>,<head>ו-<body>. - כותרת התבנית מגיעה מ-
<title>הפנימי בתוך<head>.
English
Now you try
- Notice how
<head>and<body>sit inside<html>. - Add a title, then give a page its doctype line.
עברית
כעת תנסו בעצמכם
- שים לב איך
<head>ו-<body>יושבים בתוך<html>. - הוסף כותרת, ולאחר מכן תן לעמוד את שורת סוג העמוד.
Give the page a title. Add <title>My Page</title> inside the <head>. · תן לעמוד כותרת. הוסף <title>My Page</title> בתוך ה-<head>.
Start this page properly. Add <!DOCTYPE html> as the very first line. · התחל את הדף כראוי. הוסף את <!DOCTYPE html> שורה ראשונה.