Прескочи на главни садржај
← 📄 HTML & the platform·Модул A8 · Лекција 1
ЗадатакBuild the full login page. <head>: title 'Sign in — CodeMentor', meta description, viewport, canonical 'https://learnpython.academy/login'. <body><main id='main'>: <h1>Sign in</h1>, <form action='/api/login' method='post'><label for='em'>Email</label><input id='em' type='email' name='email' required autocomplete='email'><label for='pw'>Password</label><input id='pw' type='password' name='password' required minlength='8' autocomplete='current-password'><button type='submit'>Sign in</button></form>. CSS: body { font-family: system-ui, sans-serif; max-width: 360px; margin: 80px auto; padding: 24px; }.

Завршни камен 1: ФастАПИ страница за пријаву од краја до краја

250 XP18 min
Теорија

What we're building

A login page that submits to your FastAPI /api/login endpoint. Must be:

  • Semantic — <main> with <h1>, <form> with labels.
  • Accessible — labeled inputs, focus styles, error messages associated.
  • SEO-ready — title, description, canonical.
  • Performant — no render-blocking JS in head, lazy below-fold images.
  • Pydantic-compatible — name="email", name="password", validation attributes mirroring Pydantic constraints.

This uses every concept from A1 through A7. The starter gives you the layout HTML; you add the missing meta tags, validation, ARIA, and a clean visual.

🔒

Региструј се да почнеш са кодом

Теорија је отворена за све. Едитор, преглед уживо и провера се откључавају са 7-дневним бесплатним пробним периодом — потребна картица.

Регистрација — бесплатан пробни период →

Првих 10 лекција у сваком путу су бесплатне. Без картице.

← ПретходнаСледећа лекција →

Један савет за Python или веб дневно — на имејл

Кратко, ручно писано, без спама. Одјава у једном клику.