#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →

HTML CSS Notes PDF

Free HTML CSS notes PDF: tags, forms, semantic HTML, selectors, box model, position, flexbox, grid, responsive layouts and 7 practice projects.

10 pages · 138 KB · PDF · Updated 5 Nov 2026

Prepared by: Uncodemy trainer team  ·  Reviewed by: Uncodemy  ·  Last reviewed: 5 Nov 2026

Quick Answer

Uncodemy's HTML CSS notes PDF teaches web page basics in 10 pages: HTML tags, forms, semantic HTML, CSS selectors and specificity, the box model, display and position, units, flexbox, CSS grid, responsive layouts and effects. Every topic has a short code example, and the last pages list 7 practice projects and interview questions. It is free to download after a short form.

Key takeaways

  • HTML gives the structure, CSS gives the look; the notes keep both side by side with small code examples.
  • Flexbox is for one direction (a row or a column), grid is for rows and columns together; a comparison table shows when to use which.
  • Add box-sizing: border-box and the viewport meta tag on every page; the notes explain why.
  • Write mobile-first CSS and use min-width media queries for bigger screens.
  • The last pages give 7 small projects, a table of common mistakes and 8 practice questions.

About these HTML CSS notes

This page offers Uncodemy's HTML and CSS notes as a free PDF. HTML (HyperText Markup Language) builds the structure of a web page, and CSS (Cascading Style Sheets) controls its colours, fonts, spacing and layout. The notes explain each idea in plain words, show a small code example you can type and run, and use tables and simple diagrams for things like the box model and the flexbox axes. They start from a blank index.html and end with full page layouts, so a beginner can follow them in order.

Please note: these are original Uncodemy learning notes, not official documentation. Browsers add new CSS features every year, so check MDN Web Docs when you need the full list of options for a property.

What's inside the HTML CSS notes

The PDF has 10 pages arranged in 11 numbered sections. Each section has short points, a table and at least one code example. Here is what each section covers.

1. Start with HTML and CSS

What HTML, CSS and JavaScript each do (with the skeleton, clothes and movement idea), a basic page skeleton with DOCTYPE, meta charset, the viewport tag and a linked style.css, and how to run it with VS Code and the Live Server extension.

2. HTML tags

Opening and closing tags, self-closing tags and attributes, then a table of everyday tags: headings, paragraph, link, image with alt text, lists, div and span, line break and bold or italic. It also explains block versus inline elements and shows a simple table.

3. Forms and semantic HTML

A sign-up form with labels linked by for and id, input types (text, email, password, number, checkbox, radio, date, file), select, textarea and useful attributes such as required and placeholder. A table explains the semantic tags header, nav, main, section, article, aside and footer, and why they help SEO and screen readers.

4. CSS basics

The structure of a CSS rule, the three ways to add CSS, and a selector table (element, class, id, group, descendant, child and hover). It covers specificity in one line (inline beats id, id beats class, class beats element) and the colour formats name, hex, RGB or RGBA and HSL.

5. The box model

Content, padding, border and margin with a labelled diagram, centring a box with margin: auto, the clockwise shorthand order and the box-sizing: border-box reset.

6. Display, position and units

Tables for display (block, inline, inline-block, none, flex, grid), position (static, relative, absolute, fixed, sticky) and units (px, %, em, rem, vw and vh), with a sticky navbar and a badge placed on a card.

7. Flexbox

Main axis and cross axis with a diagram, the container properties flex-direction, justify-content, align-items, flex-wrap and gap, the item properties flex, align-self and order, and examples to centre anything, build a navbar and wrap cards.

8. CSS grid

display: grid, the fr unit and repeat(), spanning columns, a property table, responsive cards with repeat(auto-fit, minmax(220px, 1fr)) and no media query, a full page layout with grid-template-areas, and a flexbox versus grid comparison table.

9. Responsive layouts

Mobile-first CSS with min-width media queries, common breakpoints for phone, tablet, laptop and large screen, max-width: 100% for images, a table that matches each layout need to flexbox or grid, and fluid font sizes with clamp().

10. Colours, fonts and effects

CSS variables, hover effects, transition and transform, box-shadow, gradients, border-radius, font properties, pseudo-classes such as :hover and :focus, and pseudo-elements ::before and ::after.

11. Projects and practice

Seven projects (portfolio page, responsive navbar, landing page, pricing cards, photo gallery, blog layout and sign-up form page) with the skills each one practises, a common mistakes table and 8 practice questions.

How to use these notes to learn HTML and CSS

HTML and CSS are learnt by typing, not by reading. Keep the PDF on one side and your editor on the other.

  • Type every example yourself into a new file and open it in the browser; change one value at a time and watch what happens.
  • Open DevTools (F12) and use the Elements panel to see the box model, padding and margin of any element.
  • For flexbox and grid, make five coloured boxes and try every value of justify-content, align-items and grid-template-columns.
  • Rebuild the layout of a real website you like with only semantic tags, flexbox and grid.

A simple three-pass method works well. In the first pass, read one section and type its examples. In the second pass, close the notes and build a small page that uses that section, then compare with the notes and fix what is different. In the third pass, a day or two later, answer two practice questions from memory and build the related project from the last section.

Syntax to remember

  • The page skeleton with <meta name="viewport" content="width=device-width, initial-scale=1"> in the head.
  • The reset *, *::before, *::after { box-sizing: border-box; }.
  • Centre anything: display: flex; justify-content: center; align-items: center; on the parent.
  • Responsive cards: grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));.
  • Shorthand order for margin and padding: top, right, bottom, left (clockwise).
  • Specificity order: inline style, then id, then class, then element.

Common mistakes beginners make

  • Leaving out the viewport meta tag, so the page looks tiny on phones.
  • Forgetting alt text on images, which hurts accessibility and SEO.
  • Using div for everything instead of header, nav, main, section and footer.
  • Writing justify-content on the child instead of the flex parent.
  • Using fixed pixel widths that cause horizontal scrolling on small screens.

Interview focus: HTML and CSS topics asked most

Front-end and full stack fresher interviews usually start with HTML and CSS basics before moving to JavaScript. The notes' practice questions match these common areas.

  • Block, inline and inline-block elements.
  • The box model and box-sizing.
  • Class versus id selectors and specificity.
  • Semantic HTML and why it matters.
  • Flexbox axes, flexbox versus grid, and making a page responsive.

Typical questions

  1. What is the difference between block, inline and inline-block?
  2. Explain the CSS box model with a diagram.
  3. What is the difference between class and id selectors? What is specificity?
  4. What is semantic HTML and why use it?
  5. Explain flexbox: main axis, cross axis, justify-content and align-items.
  6. Flexbox or grid: when do you use which?
  7. How do you make a website responsive?
  8. Build a 3-column card layout that becomes 1 column on mobile.

In a coding round you may be asked to build a small layout live. Practise the navbar, the centred box and the card grid until you can write them without looking.

A 7-day plan for HTML and CSS

  1. Day 1: Start with HTML and CSS, HTML tags. Build a page about yourself with headings, lists, a link and an image.
  2. Day 2: Forms and semantic HTML. Rebuild Day 1 with semantic tags and add a contact form.
  3. Day 3: CSS basics, the box model. Style your page with an external style.css.
  4. Day 4: Display, position and units, flexbox. Build a sticky navbar and a row of cards.
  5. Day 5: CSS grid, responsive layouts. Build a blog layout with grid areas that works on phone and laptop.
  6. Day 6: Colours, fonts and effects. Add CSS variables, hover effects and transitions, then build the pricing cards project.
  7. Day 7: answer the 8 practice questions from memory and build one more project from section 11, such as the photo gallery.

After the week, build one small page every week. Copying the layout of a real website is good practice.

Who these notes are for

  • Complete beginners who want to start web development.
  • B.Tech, BCA, MCA and B.Sc students who have a web design or web technologies lab.
  • Students joining a full stack or front-end course who want a quick base before React.
  • Freshers revising HTML and CSS before front-end or full stack interviews.

Once you are comfortable with HTML and CSS, move on to the JavaScript notes, then Bootstrap or React. For interview answers, pair these notes with the HTML and CSS Interview Questions PDF.

Download HTML CSS Notes PDF

HTML CSS Notes PDF: Tags, Flexbox, Grid, Layouts

The PDF carries the same content as this page in a clean, print-ready layout, so you can read it offline and keep it for revision.

10 pages · 138 KB · PDF · Updated 5 Nov 2026

Download PDF

Sources and further reading

Frequently Asked Questions

What does this HTML CSS notes PDF cover?
It covers HTML tags, forms, semantic HTML, CSS selectors and specificity, the box model, display, position, units, flexbox, CSS grid, responsive layouts and effects, with code examples, 7 projects and practice questions in 10 pages.
Can a complete beginner learn from these notes?
Yes. The notes start from a blank page skeleton and explain each tag and property in simple words with a small example, so you can follow them in order without any coding background.
What is the difference between flexbox and grid?
Flexbox lays out items in one direction, a row or a column, and is best for navbars, buttons and centring. Grid works with rows and columns together and is best for page layouts and card galleries.
Are these HTML CSS notes free?
Yes. Fill in the short form on this page and the PDF downloads right away. There is no fee for the notes.
What should I learn after HTML and CSS?
Learn JavaScript next for interaction, then a CSS framework such as Bootstrap and a library such as React. The JavaScript Notes PDF and React JS Notes PDF on this site follow on from these notes.
Can I print these notes?
Yes. Print them for personal study and keep them next to your editor while you type the examples and build the practice projects.