Tutorials · 58 guides
HTML & CSS Tutorials
Short how-to guides for the things people look up every day. Each one starts with the quick answer, shows why it works with live examples you can change, and ends with code you can copy.
58 tutorials
HTML Basics
Start here: what HTML is, your first HTML file, and adding CSS and JavaScript.
- What Is HTML? What It Stands For and How It Works What HTML stands for, tags, elements and attributes, how it works with CSS and JavaScript, and a first page to edit.
- How to Create, Open and Run an HTML File Make a page in Notepad, TextEdit or VS Code, save it as .html, open it in any browser, and fix the .txt trap.
- How to Make a Website with HTML and CSS (Beginner Guide) Build a two-page coffee shop site step by step: header, menu, pictures, one CSS file, phones, and putting it online.
- How to Link CSS to HTML The link tag, style blocks and style attributes, file paths for href, and what to check when CSS won’t load.
- How to Link JavaScript to HTML with the script Tag The script tag, inline scripts, defer or async, and the usual reasons a first script doesn’t run.
- How to See the HTML Code of a Website Ctrl+U and the other View Source shortcuts, Inspect, the view-source: address, phones, and copying one element.
HTML Text Tutorials
Short how-to guides for text in HTML, with live examples.
- HTML Comments <!-- --> comments, commenting out code, the Ctrl+/ shortcut, and the mistakes that break comments.
- How to Make Text Bold in HTML <b> vs <strong>, bold one word, and CSS font-weight from 100 to 900, and why 600 can look like 700.
- HTML Font and Font Size font-family with fallbacks, web-safe and Google fonts, font sizes in px, rem and em, and clamp().
- How to Add a Line Break in HTML <br> or a new paragraph, keeping typed line breaks with white-space, and breaking long words and links.
- How to Add Spaces in HTML Why HTML squeezes spaces, and the other space codes, indents, and gaps between elements.
- How to Change Text Color in HTML The color property with names, hex, rgb and hsl. Color one word, style links and check the contrast.
- HTML Headings h1 to h6 and their default sizes, one h1 per page, keeping levels in order, and restyling headings with CSS.
- How to Make Text Italic in HTML <em> vs <i> vs <cite>, CSS font-style, real italics vs slanted letters, and turning italics off.
- How to Underline Text in HTML text-decoration and the <u> tag, the line’s color, thickness and gap, and removing the underline from links.
- HTML Strikethrough <s> vs <del>, CSS line-through, the line’s color and style, old prices screen readers understand, and to-do lists.
- HTML Superscript and Subscript <sup> and <sub> for x², H₂O and footnotes, the ² and ³ characters, uneven line gaps fixed, and MathML.
- HTML Indent and Tab text-indent and padding, hanging indents, tab spaces with   and pre, and why typed spaces vanish.
HTML Layout Tutorials
Boxes, menus, tables, headers and lines: how to lay out a page, with live examples.
- HTML hr Tag The hr tag and what it means, a line’s color, thickness and width, dashed and gradient lines, and a vertical line.
- How to Center Text, a Div or an Image in HTML & CSS text-align, flexbox, grid and margin auto, plus vertical centering. Try every method live and copy the code.
- HTML div and span Block vs inline boxes, styling with a class, a flexbox card row, better tags than div soup, and nesting traps.
- How to Make a Navbar in HTML and CSS nav and a list of links, logo left and links right, the current page, a sticky bar, a phone menu and a dropdown.
- HTML Table Border border-collapse and the end of double lines, lines between rows only, rounded corners, stripes and wide tables.
- HTML Accordion details and summary with no JavaScript, a custom arrow, an FAQ block, one section open at a time, and a slide-open effect.
- HTML Tooltip The title attribute and its limits, a CSS tooltip with an arrow, keyboard focus, aria-describedby, and phones.
- HTML Header and Footer head vs header, what goes in a header and a footer, a sticky header, a footer that stays at the bottom, and landmarks.
HTML Forms Tutorials
Forms, buttons and inputs: how they work, with live examples.
- HTML Forms A coffee order form step by step: labels, input types, textarea, select, required fields and what gets sent.
- HTML Button The button tag and its three types, button or link, disabled buttons, icons, tap-friendly sizes and click events.
- HTML Slider input type="range" with min, max and step, showing the value, tick marks, vertical sliders, custom colors and two thumbs.
HTML Images & Media
Add images, video, sound and backgrounds to a page, with live examples.
- How to Add an Image in HTML The img tag, src paths and alt text, image size, centering, links, captions and background images.
- How to Change Background Color in HTML background-color for the page, a box, table cells and one word, plus gradients and dark mode.
- HTML Video The video tag, controls and poster, autoplay that works (muted), MP4 vs WebM, captions, and YouTube embeds.
- HTML Audio The audio tag and its controls, why background music won’t autoplay, MP3 vs Ogg, a play button, and transcripts.
CSS Tutorials
How CSS works: the box model, flexbox, grid, selectors, positioning and animation, with live examples.
- CSS Box Model Content, padding, border and margin, why width adds up, box-sizing: border-box and margin collapsing.
- CSS Flexbox Tutorial display: flex, justify-content, align-items, gap, wrap and flex: 1, with a nav bar, cards and centering.
- CSS Grid Tutorial Columns with fr, repeat and minmax, auto-fit vs auto-fill, spanning cells, named areas and a responsive card grid.
- CSS Selectors Class, id and attribute selectors, combinators, :hover, :nth-child and :has(), ::before, and how specificity picks a winner.
- CSS Comments /* */ comments, commenting out a rule, why // breaks the next rule, nesting, and /*! notes minifiers keep.
- CSS Position and z-index relative, absolute, fixed and sticky, a badge on a card, inset, z-index, and why 9999 sometimes still loses.
- CSS Media Queries min-width and mobile first, breakpoints, the viewport tag, dark mode, reduced motion, touch, print and container queries.
- CSS Transitions Smooth hover effects: the shorthand, easing curves, lift and underline effects, fading out, and height: auto.
- CSS Animations @keyframes, transform basics, fill-mode and why things jump back, a spinner, staggered fade-ins and reduced motion.
- CSS Variables --name and var(), fallbacks, overriding one part, calc(), a dark theme, wrong values, JavaScript and @property.
- CSS Border The shorthand and its one required part, all eight styles, one side only, rounded corners and hover borders that don’t shift.
- CSS Display block, inline and inline-block side by side, none vs visibility vs opacity, flex and grid, contents and lost bullets.
- CSS Background Image url() paths, cover vs contain, repeat and position, a dark overlay for readable text, layers, fixed and image-set().
- CSS Overflow hidden, scroll, auto and clip, one-line ellipsis and line clamp, rounded image corners, and finding what scrolls sideways.
- CSS Opacity Fading elements, transparent backgrounds with solid text, hover and disabled looks, and why opacity: 0 still gets clicks.
- CSS Float Wrap text around an image, clear, the collapsing parent and flow-root, text around a circle, and why layouts moved on.
React Tutorials
What JSX is, hooks, forms, conditional rendering and inline styles, with small examples.
- What Is JSX? And What Is TSX? Explained with Examples JSX and TSX next to plain HTML: className, style objects, closed tags, lists with map() and typed props.
- React Hooks Explained useState, useEffect, useRef, useMemo and useCallback with small runnable examples, plus the rules of hooks.
- React Forms Controlled inputs, checkboxes, selects, submit and validation, FormData, and React 19 form actions.
- React Conditional Rendering if and early returns, && and its 0 trap, the ternary, null, several views, and hiding vs removing.
- React Inline Styles The style prop as an object: camelCase, px and unitless numbers, styles from state, CSS variables, and when a class is better.
URL Guides
What a URL is, redirects, image URLs and canonical URLs, explained with examples.
- What Is a URL? Meaning, Parts and Examples What URL stands for, every part of a web address from https to the #, URL vs URI, and relative links in HTML.
- How to Redirect a Page in HTML The meta refresh tag, a JavaScript redirect, 301s in .htaccess and Nginx, and 301 vs 302, 307 and 308.
- How to Get an Image URL Copy image address in every browser and on phones, odd blob: and data: links, and how to give your own picture a URL.
- Canonical URL The rel=canonical tag, which addresses count as copies, canonical vs 301 vs noindex, and the mistakes that get it ignored.
No tutorial matches “”.
Try a shorter word, like “table” instead of “tables in html”, or look through every topic.
Tools to keep open while you learn
- HTML Tags Every tag with a tiny example.
- HTML Entities Codes for spaces, ©, arrows and more.
- Color Picker HEX, RGB and HSL codes and color names.
- HTML Editor Try any example with a live preview.