Favorites

Markup Basics - HTML Tutorial

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee

In this chapter you'll learn the HTML elements you'll use on almost every page you build. Each section includes short examples that you can try in your html-practice folder.

Before you start, you should be comfortable creating an HTML file, editing it and viewing it in your browser. If you're not, work through Chapter 1, Getting Started first.

By the end of this chapter, you'll be able to:

  • set up the head of a page properly
  • organize text with headings, paragraphs and line breaks
  • mark up important, emphasized and specialized text
  • change text and background colors
  • link to other pages and to sections within a page
  • add images that load quickly and are accessible
  • create bulleted, numbered and description lists

Sections in This Chapter

The Head Element

Set up the information every page needs: title, character encoding, viewport, description and style sheet links.

Paragraphs and Line Breaks

Break your text into readable paragraphs, and learn when (and when not) to use a line break.

Headings

Give your page a clear outline with heading levels h1 to h6.

Formatting Text

Mark up words and phrases with elements such as strong, em, mark and code, and learn the difference between inline and block elements.

Colors

Set text and background colors using color names, hex codes, rgb() and hsl(), while keeping text easy to read.

Links

Understand URLs, link to other sites and your own pages, and jump to sections within a page.

Images

Add images with useful alternative text, choose the right file format and help pages load smoothly.

Lists

Create unordered, ordered and description lists, and nest lists inside one another.

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee