ትርጉም ያለው HTML + ቀላል Layout! 🏗️✨
Meaningful HTML structure + easy CSS layouts with Flexbox!
Semantic HTML ማለት tags ትርጉም ያላቸው ናቸው — browser እና ሰው ሁለቱም ይረዱታል።
ከዚህ በፊት <div> ብቻ ይጠቀሙ ነበር — አሁን ትርጉም ያለው tag አለ!
Semantic HTML uses meaningful tags that describe their purpose — better for browsers, SEO, and accessibility.
ምሳሌ: <div> = "ሳጥን" ብቻ, ትርጉም የለውም
<header> = "ይህ የ page ርዕስ ክፍል ነው" — ትርጉም አለው!
div has no meaning, but header/footer/nav/main tell exactly what the content is.
👁️ የ Web Page አወቃቀር — ትርጉም ያለው HTML:
How a web page is structured with semantic tags:
<!DOCTYPE html> <html> <body> <header> <h1>EthioCode 🇪🇹</h1> </header> <nav> <a href="#">Home</a> <a href="#">ትምህርቶች</a> <a href="#">Contact</a> </nav> <main> <section> <h2>HTML ትምህርቶች</h2> <article> <h3>ክፍል 1 — HTML ምንድን ነው?</h3> <p>HTML ትምህርት...</p> </article> </section> </main> <footer> <p>© 2025 @AppMinds_ET</p> </footer> </body> </html>
Flexbox — elements ን አቀማምጦ ለማዘጋጀት ቀላሉ CSS መንገድ ነው። ካርዶች፣ navbar፣ grid ሁሉም Flexbox ይጠቀማሉ!
Flexbox is the easiest way to arrange elements in a row or column — used for navbars, cards, and layouts.
ዋናው ነገር: parent element ላይ display: flex ማስቀመጥ ነው — ውስጡ ያሉ elements ሁሉ ይደረደራሉ!
Key: Add display:flex to the parent element — all children automatically line up!
/* Parent element ላይ flex ያስቀምጡ */ .container { display: flex; /* አቅጣጫ — Direction */ flex-direction: row; /* ↔ አግድም (default) */ flex-direction: column; /* ↕ ቁልቁል */ /* አቀማመጥ — Justify Content (Main Axis) */ justify-content: flex-start; /* ← ግራ */ justify-content: center; /* ↔ መሃል */ justify-content: flex-end; /* → ቀኝ */ justify-content: space-between; /* | ↔ | */ /* ቁመት አቀማመጥ — Align Items (Cross Axis) */ align-items: center; /* ቁመቱ መሃል */ align-items: flex-start; /* ላይ */ align-items: flex-end; /* ታች */ /* ክፍተት — Gap */ gap: 16px; }
⚡ ቁልፎቹን ጫን — Flexbox ቀጥታ ተለወጥ! Click buttons to change flexbox properties live!
<!DOCTYPE html> <html> <head> <style> /* Navbar */ nav { display: flex; justify-content: space-between; align-items: center; background: #1e40af; padding: 16px 24px; color: white; } nav a { color: white; text-decoration: none; margin-left: 20px; } /* Cards Container */ .cards { display: flex; gap: 20px; padding: 30px; flex-wrap: wrap; } .card { flex: 1; min-width: 200px; background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); } </style> </head> <body> <nav> <h2>EthioCode 🇪🇹</h2> <div> <a href="#">Home</a> <a href="#">ትምህርቶች</a> </div> </nav> <main> <div class="cards"> <div class="card"><h3>HTML 📄</h3></div> <div class="card"><h3>CSS 🎨</h3></div> <div class="card"><h3>JS ⚡</h3></div> </div> </main> <footer> <p style="text-align:center; padding:20px; color:#64748b;"> © 2025 @AppMinds_ET </p> </footer> </body> </html>
header, nav, main, section, article, aside, footer — ትርጉም አላቸው።
Use semantic tags instead of just divs — they give meaning to your HTML.
Parent element ላይ ብቻ display:flex ያስቀምጡ — ልጆቹ ይደረደራሉ።
Just add display:flex to the parent — children automatically align.
center, space-between, flex-start, flex-end
Controls horizontal alignment of flex items.
center, flex-start, flex-end — ቁመቱ እንዴት ይሁን
Controls vertical alignment of flex items.