HTML and CSS · lesson 6 of 30 · free

Links with a href — HTML and CSS for kids

Links are what make the web a web. A link uses the a tag (anchor). Its href attribute holds the address to go to — another page like about.html or a full web address. The words between the opening and closing a tags are what you see and click. Adding target with the value _blank opens the page in a new tab.

▶ Watch how it works

Got it? Practise ↓

Code tip

Where and what — “href holds the address; the words between the tags are what you click”

  1. A link is <a href="address">words to click</a>.
  2. href holds where it goes; the text between the tags is what you click.
  3. target="_blank" opens the link in a new tab.

Use it for: Joining your pages into a website, adding a menu and linking to sources in a school project.

Worked example: 🔗 Which address opens when you click this link?
<a href="games.html">Play games</a> → games.html

  1. The address of a link is inside href="…".
  2. href="games.html" — so games.html opens.

Check: “Play games” is what you click; games.html is where you go ✓

▶ Watch it animated

✏️ Practice

Work it out in your head or on paper, type the answer and press Check. Stuck? Press “Show me how”.

Right: 0 · Tried: 0

🏁 Lesson 6 test

20 questions. Check each answer, then go to the next one. Get 16 or more right to pass.

🏅 Sign in with Google to earn the 🔗 Hyperlink Hopper badge when you pass — and a certificate when you finish all 10 lessons of Part 1 · HTML Basics. You can still take the test without signing in.

🖨️ HTML Worksheet: Links a href

✨ Free AI tutor

Ask the AI tutor about this lesson

Why does it work? When should you use it? Ask in English, मराठी or हिंदी.

Sign in with Google to ask Free — 20 questions a day.

👩‍🏫 HTML and CSS classes near you — online or at home

Prefer a real teacher? TalentJR teachers take live online classes anywhere in India and visit homes in selected cities. Tell us what you need and our team will call you with timings and fees.

Live online classesSmall groups or 1:1 with a teacher, from home, any city.
Teacher at homeA TalentJR teacher visits your home (selected cities).
At a centreClasses at a TalentJR partner centre near you, where available.
Badges, certificates & gifts A badge for every lesson you pass, a certificate for every part you finish, plus TalentJR Points for daily practice. Computer worksheets Flowcharts, block coding, spreadsheets and safe internet.