| 📁 Folder | 📝 Topic | 📄 Description |
|---|---|---|
| 01-HTML-Basics | HTML Basics | Tags, Elements, Attributes, IDs, Classes. |
| 02-HTML-Structure | Page Structure | Head, Body, Meta tags, Scripts. |
| 03-Common-Tags | Common Tags | Headings, Paragraphs, Links, Lists, Divs. |
| 04-Tables | Tables | Rows, Cols, Headings, Spanning. |
| 05-Forms-Inputs | Forms & Inputs | Inputs, Select, Checkbox, GET vs POST. |
| 06-CSS-Intro | Intro to CSS | Inline, Internal, External CSS. |
- HTML = HyperText Markup Language
- معنى: لغة لوصف محتوى صفحات الويب.
- استخداماتها: العناوين، النصوص، الروابط، القوائم.
- مش لغة برمجة: دي لغة ترتيب وهيكل.
Think of HTML like a Word Document. When you write in Word, you choose:
- Big Title (Heading 1)
- Subtitle (Heading 2)
- Paragraph text
- Bold/Italic
HTML does the EXACT same thing, but with code.
<h1>Hello World</h1>
{{ ... }}كلمة بتتكتب بين علامات < >:
- Open Tag:
<p>(البداية) - Close Tag:
</p>(النهاية)
هو "العنصر الكامل": (البداية + المحتوى + النهاية).
Structure Breakdown
Element
👇
<p> Hello World </p>
👆 👆 👆
Tag Content Closing Tag
| Part | Code |
|---|---|
| Opening Tag | <p> |
| Content | Hello |
| Closing Tag | </p> |
| Full Element | <p>Hello</p> |
معلومة صغيرة جوه التاج بتحدد خصائص العنصر.
شكلها: name="value"
<a href="https://google.com" target="_blank">Google</a>
<p class="text">Hello!</p>
<input type="text" name="username" placeholder="Enter your name" />بعض العناصر ملهاش محتوى جوه → مش محتاجة تاج إغلاق.
<br />
<hr />- لتكرار الشكل على أكتر من عنصر
- CSS Selector:
.className
- فريد لعنصر واحد
- CSS Selector:
#idName
- غالبًا في الفورمز
- CSS Selector:
[name="username"](مثال)
<h1 id="main-title">Welcome to the page</h1>
<p class="info">Paragraph 1</p>
<p class="info">Paragraph 2</p>
<input type="text" name="username" placeholder="Enter your name" />#main-title {
color: blue;
}
.info {
color: green;
}
input[name="username"] {
border: 2px solid red;
}Go to folder 01-HTML-Basics to see the code in action!
كل صفحة HTML ليها هيكل أساسي ثابت:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<!-- Content goes here -->
</body>
</html>Explanation:
<!DOCTYPE html>→ بيقول للمتصفح إن دي صفحة HTML5<html>→ بداية الصفحة كلها<head>→ مكان المعلومات اللي مش بتظهر على الصفحة زي العنوان، الروابط للـ CSS أو الـ meta tags<title>→ عنوان الصفحة اللي بيظهر في التاب بتاع المتصفح<body>→ كل حاجة المستخدم يشوفها: نصوص، صور، روابط، أزرار…
- معلومات عن الصفحة زي الترميز، الوصف، أو الكلمات المفتاحية مثال:
<meta charset="UTF-8" />- ليه مهم؟: عشان المتصفح يفهم الحروف العربي والرموز (Emojis) ويظهرها صح. من غيره الكلام ممكن يبان رموز غريبة. 😵💫
<meta name="description" content="This is my website" />- بيربط الصفحة بـ CSS خارجي مثال:
<link rel="stylesheet" href="style.css" />- لو هتستخدم JavaScript مثال:
<script src="script.js"></script>Go to folder 02-HTML-Structure to see the code in action!
HTML عنده 6 مستويات للعناوين: <h1> لـ <h6>
<h1>→ أهم عنوان<h6>→ أقل أهمية
Example:
<h1>Main Heading</h1>
<h2>Sub Heading</h2>
<h3>Smaller Heading</h3><p>→ paragraph → مسافة بين الفقرات تلقائي<br>→ line break → سطر جديد بدون paragraph
<p>This is paragraph one.</p>
<p>This is paragraph two.</p>
<p>This line<br />breaks here.</p><hr>→ خط أفقي لتقسيم المحتوى
<p>Before the line</p>
<hr />
<p>After the line</p>- HTML بتتجاهل المسافات الزايدة والـ newlines
- استخدم
<pre>أو CSSwhite-space: preللحفاظ على المسافات
<p>This text has multiple spaces.</p>
<pre>
This text preserves spaces
and
line breaks
</pre><a>→ لإنشاء رابطhref="URL": العنوان (Destination).target="_blank": فتح في تاب جديد.target="_self": فتح في نفس الصفحة.
<a href="https://google.com" target="_blank">Visit Google</a><ul>
<li>Item 1</li>
<li>Item 2</li>
</ul><ol>
<li>First</li>
<li>Second</li>
</ol><dl>→ قائمة تعريفية<dt>→ المصطلح<dd>→ التعريف أو الوصف
<dl>
<dt>HTML</dt>
<dd>HyperText Markup Language</dd>
</dl><ul>
<li>
Fruits
<ul>
<li>Apple</li>
</ul>
</li>
</ul><div>→ بلوك كبير لتقسيم الصفحة (Container).<span>→ عنصر صغير جوه نص أو عنصر تاني.
- Block → تاخد كل السطر:
<p>, <div>, <h1> - Inline → جوه السطر:
<span>, <b>, <i>, <a>
<div class="container">
<p>This is a <span style="color:red">red text</span> inside a paragraph.</p>
</div><address>→ بيانات الكاتب أو جهة الاتصال
<address>
Written by John Doe.<br />
Email: <a href="mailto:[email protected]">[email protected]</a>
</address><b>→ نص bold بدون معنى سيمياني<strong>→ نص مهم/مؤكد → عادة بيظهر bold
<p>This is <b>bold text</b> and this is <strong>strong text</strong>.</p><i>→ نص italic بدون معنى سيمياني<em>→ نص مؤكد → عادة بيظهر italic
<p>This is <i>italic text</i> and this is <em>emphasized text</em>.</p><u>→ نص تحته خط
<p>This is <u>underlined text</u>.</p><sup>→ نص فوق السطر (superscript)<sub>→ نص تحت السطر (subscript)
<p>H<sub>2</sub>O is water.</p>
<p>E = mc<sup>2</sup></p><mark>→ لتسليط الضوء على النص<del>→ نص اتحذف<ins>→ نص اتحط جديد
<p>This is <mark>highlighted</mark> text.</p>
<p><del>Old text</del> <ins>New text</ins></p><small>→ نص أصغر<big>→ نص أكبر
<p>This is <small>small text</small> and this is <big>big text</big>.</p><q>→ اقتباس قصير inline<blockquote>→ اقتباس طويل block<cite>→ مصدر أو مؤلف
<p>He said <q>Hello World</q>.</p>
<blockquote>This is a long quote from a famous person.</blockquote>
<p>Source: <cite>John Doe</cite></p><abbr>→ اختصار مع تعريف عند hover
<p>The <abbr title="World Health Organization">WHO</abbr> is global.</p><img>→ لإضافة صورة.- Attributes:
src→ مسار الصورة (Source).alt→ نص بديل لو الصورة ماظهرتش (Alternative Text).width→ العرض.height→ الطول.
<img src="image.jpg" alt="Description" width="200" height="200" /><video>→ لإضافة فيديو.- Attributes:
src→ مسار الفيديو (ممكن تستخدم<source>جواه).controls→ عشان تظهر أزرار التشغيل والوقف.width/height→ التحكم في الحجم.autoplay→ تشغيل تلقائي.loop→ إعادة تشغيل تلقائي.muted→ كتم الصوت.poster→ صورة تظهر قبل التشغيل.
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>- بيعرض صفحة ويب تانية جوه صفحتك.
- أهم Attributes:
src→ الصفحة اللي هتتعرض.width/height→ حجم الـ iframe.frameborder→ يظهر إطار ولا لأ (0 أو 1).scrolling→ يظهر Scroll ولا لأ (yes, no, auto).allowfullscreen→ تشغيل المحتوى Fullscreen.
Example:
<iframe src="https://example.com" width="400" height="250" frameborder="0">
</iframe>أهم استخدام: عرض محتوى خارجي جاهز جوّه صفحتك (زي YouTube videos أو Google Maps أو أي صفحة تانية).
Go to folder 03-Common-Tags to see the code in action!
الـ Table عبارة عن بيانات معمولة في صفوف Rows و أعمدة Columns.
العناصر الأساسية:
<table>→ بيحدد إن عندي جدول.<tr>→ Table Row → صف.<td>→ Table Data → خلية عادية في الصف.
Example:
<table>
<tr>
<td>15</td>
<td>30</td>
<td>45</td>
</tr>
<tr>
<td>60</td>
<td>90</td>
<td>120</td>
</tr>
</table>Output:
| 15 | 30 | 45 |
| 60 | 90 | 120 |
لما تحب تعمل عنوان للعمود أو الصف، بتستخدم <th> بدل <td>.
Example:
<table>
<tr>
<th scope="col">Saturday</th>
<th scope="col">Sunday</th>
</tr>
<tr>
<th scope="row">Tickets Sold</th>
<td>120</td>
<td>135</td>
</tr>
</table>Output:
| Saturday | Sunday | |
|---|---|---|
| Tickets Sold | 120 | 135 |
ليه scope مهم؟
scope="col"→ عنوان لعمودscope="row"→ عنوان لصف- ➜ يساعد الـ screen readers (accessibility).
لو عايز خلية تمتد على أكتر من عمود:
<td colspan="2">Geography</td>Output:
| Math | Geography (colspan=2) | Physics | |
| 80 | 90 | 85 | 92 |
لو خلية تمتد على أكتر من صف:
<td rowspan="2">Movie</td>Output:
| Movie (rowspan=2) | Inception |
| Interstellar |
في الجداول الكبيرة، بنقسم الجدول 3 أجزاء:
<thead>→ عناوين الجدول<tbody>→ بيانات الجدول الأساسية<tfoot>→ إجمالي / ملاحظات / نهاية الجدول
Example:
<table>
<thead>
<tr>
<th>Date</th>
<th>Income</th>
<th>Expenditure</th>
</tr>
</thead>
<tbody>
<tr>
<td>18th January</td>
<td>212</td>
<td>39</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Total</td>
<td>7824</td>
<td>1241</td>
</tr>
</tfoot>
</table>Output:
| Date | Income | Expenditure |
|---|---|---|
| 18th January | 212 | 39 |
| Total | 7824 | 1241 |
Go to folder 04-Tables to see the code in action!
<form>→ العنصر اللي بيجمع كل الحقول ويرسل البيانات.- أهم Attributes:
action→ الرابط اللي هتتبعت له البيانات.method→ طريقة الإرسال (GETأوPOST).enctype→ لو فيه رفع ملفات (multipart/form-data).
Example:
<form action="/submit" method="POST" enctype="multipart/form-data">
<!-- inputs here -->
</form>Example:
<input type="text" name="username" placeholder="Enter Name" required disabled />| Attribute | Function |
|---|---|
type |
نوع الحقل (text, password, email...) |
name |
اسم الحقل → مهم لإرسال البيانات للسيرفر |
placeholder |
نص يظهر جوه الحقل قبل الكتابة |
value |
القيمة الافتراضية للحقل أو نص الزر |
required |
يجبر المستخدم على ملء الحقل |
min, max |
للأرقام، الحد الأدنى والأقصى |
checked |
لخانات متظبطة مسبقًا (checkbox/radio) |
readonly |
الحقل للقراءة فقط |
disabled |
الحقل غير نشط |
- حقل نص عادي.
<input type="text" name="username" placeholder="Enter your name" required />- حقل كلمة سر مخفي.
<input
type="password"
name="password"
placeholder="Enter your password"
required
/>- يتحقق من صيغة البريد الإلكتروني.
<input type="email" name="email" placeholder="Enter your email" required />- يقبل أرقام بس.
<input
type="number"
name="age"
placeholder="Enter your age"
min="1"
max="100"
required
/>input type="submit": زر إرسال الفورم (الطريقة القديمة).<button type="submit">: الطريقة الأحدث والأقوى.- ممكن تحط جواه أيقونات أو تشكيله (HTML Content).
- Types:
type="submit"(default): يرسل الفورم.type="reset": يمسح البيانات.type="button": زر عادي (مبتعملش حاجة غير بـ JS).
<!-- Old Way -->
<input type="submit" value="Submit" />
<!-- Modern Way 🚀 -->
<button type="submit">Register Now</button>- زر إعادة تعيين الحقول.
<input type="reset" value="Reset" />- اختيار واحد أو أكتر.
<input type="checkbox" name="subscribe" value="newsletter" /> Subscribe- اختيار واحد من مجموعة.
<input type="radio" name="gender" value="male" /> Male
<input type="radio" name="gender" value="female" /> Female- رفع ملفات.
<input type="file" name="profile-pic" />10. hidden
- حقل مخفي للمستخدم.
<input type="hidden" name="userId" value="12345" />- للنصوص الكبيرة (زي الرسائل).
<textarea
name="message"
placeholder="Enter your message"
rows="5"
cols="30"
></textarea>- قائمة منسدلة.
<select name="country">
<option value="eg">Egypt</option>
<option value="us">USA</option>
<option value="uk">UK</option>
</select>- بيربط نص توضيحي بحقل الإدخال.
- مهم جدًا: لما تدوس على الـ Label، المتصفح بيعمل Focus على الـ Input.
- لازم
forبتاعة الـ Label تكون نفس الـidبتاعة الـ Input.
<label for="user">Username:</label>
<input type="text" id="user" name="username" />- البيانات بتتبعت في الرابط (URL).
- كويس للبحث أو بيانات بسيطة.
- Limit للبيانات.
<form action="/search" method="GET">
<input type="text" name="query" />
<input type="submit" value="Search" />
</form>- البيانات بتتبعت في جسم الطلب (Request Body).
- مناسب للبيانات الحساسة أو الملفات.
<form action="/submit" method="POST">
<input type="text" name="username" />
<input type="password" name="password" />
<input type="submit" value="Login" />
</form>البلدي (Summary):
- GET → البيانات تظهر في الرابط → للبحث أو بيانات عامة.
- POST → البيانات مش تظهر في الرابط → للملفات وكلمات السر.
Go to folder 05-Forms-Inputs to see the code in action!
CSS = Cascading Style Sheets
- وظيفته: تحكم في شكل وتصميم صفحات الويب.
- الفرق بينه وبين HTML:
- HTML = محتوى الصفحة (الهيكل).
- CSS = شكل الصفحة (ألوان، خطوط، مساحة، ترتيب...).
- بيتكتب جوه العنصر نفسه باستخدام
style attribute.
<p style="color:red; font-weight:bold;">Hello World!</p>- بيتكتب جوه
<head>في تاج<style>.
<head>
<style>
p {
color: blue;
font-size: 18px;
}
</style>
</head>- ملف خارجي بامتداد
.cssوبنربطه بالصفحة.
<link rel="stylesheet" href="style.css" />HTML:
<p class="highlight">Hello with CSS!</p>CSS:
.highlight {
color: blue; /* لون النص */
font-weight: bold; /* خط غامق */
font-size: 20px; /* حجم الخط */
font-family: Arial, sans-serif; /* نوع الخط */
background-color: #f0f0f0; /* لون الخلفية */
padding: 5px; /* مساحة داخلية */
margin: 10px; /* مسافة خارجية */
text-align: center; /* محاذاة النص */
border: 1px solid #ccc; /* إطار خفيف */
}Go to folder 06-CSS-Intro to see the code in action!


