🟢 What Are Attributes & How Do They Work? 🇬🇧 ENGLISH (Super simple) 🧠 What is an attribute? An attribute is extra information for an HTML element. It goes inside the opening tag It changes how the element works It gives more details to the browser 👉 Think: Element = thing Attribute = extra info about the thing 🧱 Basic attribute syntax <element attribute="value"></element> Break it down: attribute → the name = → connects name and value "value" → the setting 🧸 Kid-friendly example Think of a school backpack 🎒 Backpack = HTML element Color, size, name tag = attributes Same backpack. Different attributes. 🔗 Example: Link (<a> element) HTML link with attributes <a href="https://www.freecodecamp.org/news/" target="_blank"> freeCodeCamp News </a> 🧠 What do these attributes do? 1️⃣ href Tells the link where to go href = hyperlink reference Example: href="https://www.freecodecamp.org" 2️⃣ target Tells the browser where to open the link Common value: target="_blank" 👉 _blank = open in a new tab 🔄 What you need to change ✅ Do this: Change: href="https://www.freecodecamp.org/news/" To: href="https://www.freecodecamp.org" 🖱️ What happens now? You click the link 🖱️ The freeCodeCamp homepage opens It opens in a new tab 🆕 Why? Because of target="_blank" Voir plus