HTML Tailwind Portfolio in 1 Day Simply Explained (with Diagrams and Real Code)

HTML Tailwind Portfolio in 1 Day: The Essentials in One Article — Real Code, Diagrams and Concrete Steps, Excerpts from a 46-Lesson Course.

HTML Tailwind Portfolio in 1 Day Simply Explained (with Diagrams and Real Code)

A guide that gets straight to the point: Portfolio HTML Tailwind 1jour dissected with diagrams, concrete examples and tested commands. Everything comes from a structured 11-chapter course — here is the best of it.

tl;dr
  • Introduction and Express Setup
  • HTML5 Basics for Portfolio
  • Tailwind CSS Fundamentals
  • Hero Section and Navigation
  • About, Skills and Projects Sections
~$ cat ./parcours.md # Portfolio HTML Tailwind 1jour — 10 chapters
01
Introduction and Setup Express
→ Course presentation and portfolio examples→ Install VS Code + Live Server + Tailwind IntelliSense+ 1 more lessons
02
HTML5 Basics for Portfolio
→ Essential HTML5 semantic tags→ Typical structure of a one-page portfolio+ 2 more lessons
03
Tailwind CSS Fundamentals
→ Utility-first: why Tailwind changes the game→ Colors, spacing and typography in Tailwind+ 2 more lessons
04
Hero Section and Navigation
→ Sticky responsive navbar with Tailwind→ Hero section with photo and CTA+ 2 more lessons
05
About Skills and Projects Sections
→ About section with photo and bio→ Skills grid with Heroicons icons+ 2 more lessons
06
Responsive Design
→ Tailwind breakpoints – sm, md, lg, xl, 2xl→ Mobile-first approach and responsive utilities+ 2 more lessons
07
Dark Mode and Customization
→ Tailwind dark mode – class strategy→ Dark mode toggle with localStorage+ 2 more lessons
08
Contact Form
→ HTML5 form + native validation→ Formspree – receive messages by email+ 2 more lessons
🏁
Final project (+ 2 chapters along the way)
→ You leave with a concrete, demonstrable project

Customize tailwind.config.js – colors, fonts

NOTEObjective — Customize the Tailwind theme via tailwind.config.js: add your own brand colors, fonts, and extend the palette without breaking existing utilities.

Learning objectives

TIPAt the end of this module
  • Understand the difference between theme and theme.extend
  • Add a custom brand color
  • Declare a color shade range (50 to 900)
  • Register a custom font in fontFamily
  • Use these custom values in your classes

theme vs theme.extend

The core of Tailwind customization is the theme object. The key pitfall is choosing correctly between writing directly inside theme (which replaces everything) or inside theme.extend (which adds without breaking anything).

ApproachEffectWhen to use it
theme: {...}Completely replaces the default valueRare, very strict design system
theme.extend: {...}Adds to the default valuesAlmost always
WARNINGWarning: if you write your colors directly inside theme.colors without extend, you lose all default Tailwind colors (red, blue, gray...). Almost always use extend.

Add a brand color

Suppose your brand uses a specific purple. We add it inside extend.colors.

Full shade range

The 50–900 object gives bg-brand-50 through bg-brand-900.

Register a custom font

To use a font like Inter or Poppins, add it inside fontFamily. The name becomes a font-... utility.

Project filters with data-attributes

NOTEObjective — Add filter buttons (All, Web, Mobile, Design...) that show or hide projects according to their category, using data-* attributes and a mini JavaScript script of just a few lines.

Learning objectives

TIPAt the end of this module
  • Understand what a data-* attribute is and what it is used for
  • Categorize each project card via data-category
  • Create a filter button bar
  • Write the JavaScript that shows/hides the cards
  • Manage the active state of the selected button

What is a data-attribute?

A data-attribute is a custom HTML attribute that starts with data-. It is used to store information on an element without affecting its display. For example, data-category="web" tells JavaScript that this card belongs to the "web" category. It is a clean and standard way to bind your data to your elements.

AttributeExampleJS access
data-categorydata-category="web"el.dataset.category
data-filterdata-filter="mobile"el.dataset.filter
data-yeardata-year="2026"el.dataset.year
NOTENote: in JavaScript, data-category is read via element.dataset.category. The data- prefix disappears and the hyphen becomes camelCase if the name is compound (data-my-keydataset.myKey).

Step 1: categorize the cards

We add a data-category on each project card built in the previous module.

TIPTip: for a smooth transition, replace hidden with a set of classes opacity-0 scale-95 + transition, and handle the appearance with a small delay. The effect is more elegant than a sudden disappearance.
WARNINGWarning: always place your <script> just before the </body> tag or use the defer attribute. Otherwise the script runs before the buttons exist and querySelectorAll returns an empty list.

Responsive images and picture element

NOTEObjective — Serve the right image at the right screen size thanks to srcset and the <picture> tag, for a fast portfolio that does not make a phone download a 4K image.

Learning objectives

TIPAt the end of this module
  • Understand why a single image for all screens is a problem
  • Use srcset and sizes for multiple resolutions
  • Use <picture> for art direction
  • Keep a fixed ratio with Tailwind (aspect-)
  • Avoid layout shift (CLS) with width and height

The single-image problem

If you serve the same 2000px-wide image to everyone, the phone downloads unnecessary megabytes to display them at 375px. It is slow, costs the user data, and tanks your Lighthouse score.

The modern solution: provide multiple versions of the same image and let the browser choose the one best suited to the actual display size and screen density.

srcset and sizes: multiple resolutions

The srcset attribute lists several files with their intrinsic width (in w). The sizes attribute tells the browser the expected display width according to the screen.

picture

Different images according to a media query. For art direction (cropping, orientation).

Keep a clean ratio with Tailwind

To prevent your images from distorting, Tailwind provides the aspect- and object-cover utilities.

go-further

This article covers the most useful excerpts — the full Portfolio HTML Tailwind 1jour course (11 chapters, 46 lessons, corrected exercises and final project) takes you all the way.

./access-the-full-course free course: Vibe Coding

FAQ

How long does it take to learn Portfolio HTML Tailwind 1jour?
With a structured progression (11 chapters, 46 short and practical lessons), you reach an operational level in a few weeks at 30 to 60 minutes per day. The key is to practice each concept immediately.
Are there any prerequisites?
No prerequisites: the course starts from zero; every concept is introduced before being used.
Where to start concretely?
Reproduce the commands from this article, then follow the full Portfolio HTML Tailwind 1jour course: it chains the 46 lessons in order, with exercises and a final project.

📬 Want to receive this type of guide every week? Subscribe for free — real code, zero fluff.