DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk3 min

HTML and CSS Tags, Part 2: Finding the Right Elements, Selectors, and Styles

HTML elements provide structure and meaning; tags express them in markup. Learn how CSS selectors target elements and how to find the right properties and references.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

HTML elements give a document its structure and meaning; tags are the markup notation used to write those elements. CSS then uses selectors to target elements and declarations to assign property values. To find which styles apply, look up the property in a CSS reference and use selector rules to understand which elements receive it.

Elements and tags are related, but not the same

An HTML element is a structural or semantic unit of a document, such as a heading, paragraph, link, or form control. Tags are the notation that marks the element in HTML source. For example, <p> begins a paragraph element and </p> ends it; the tags express the element in the document’s markup.

As an Amazon Associate I earn from qualifying purchases.

When you need to know what an element means, which attributes it accepts, or how it fits into a page, consult an HTML element reference. Browsing by function—such as text content, forms, embedded content, or document metadata—is often more useful than trying to memorize a flat list. MDN’s HTML elements reference groups elements by their roles and links to related attribute information, including global attributes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do I find which styles can be associated with an HTML element?

Start with the CSS property you want to use, then identify the selector that targets the element or elements you want to affect. HTML does not provide a separate list of “styles for each tag”: CSS rules apply through selectors, and the properties in their declarations describe the styling.

#1 Best Overall
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option

A CSS rule has a selector followed by a declaration block. A declaration pairs a property with a value. In p { color: navy; }, p is the selector, while color: navy is a declaration: color is the property and navy is its value. The selector targets paragraph elements, so the declaration styles the text in those elements.

  1. Look up the property. Use the MDN CSS reference to check a property’s purpose, values, and related details.
  2. Choose a selector. A type selector such as p targets an element type; other selectors can target elements by attributes, relationships, or state. The CSS reference also indexes selector syntax.
  3. Write a declaration. Pair the property with a suitable value, then place the declaration in a rule for the selector.

The CSS reference is broader than a property catalog. It also covers selectors, pseudo-classes, pseudo-elements, data types, functions, and at-rules—parts of CSS you may need when building a rule or understanding why it matches a particular element.

Which reference should I use: MDN or the HTML Standard?

Reference Best for Organization and scope
MDN HTML reference and MDN CSS reference Explanatory lookups while learning or working: what an element, property, selector, or other CSS feature does. Task-friendly indexes covering HTML elements and attributes, and CSS properties and other CSS concepts.
WHATWG HTML Living Standard Standards-level detail about HTML requirements and behavior. The normative HTML standard, organized as specification text rather than a quick-reference guide; it does not serve as the CSS reference.

For a quick explanation, MDN is usually the more approachable starting point. Consult the WHATWG standard when you need the specification-level account of HTML. The references complement each other: MDN offers explanatory indexes, while WHATWG publishes the HTML Living Standard.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Browse HTML by what you are building

Instead of memorizing every element, start with the job the markup needs to do. The MDN HTML reference groups elements by function, helping you find candidates and then check their semantics and attributes.

  • Organize the page: look for elements that define document sections and structure.
  • Present text and meaning: look for elements for headings, paragraphs, links, and text-level semantics.
  • Collect or display information: browse elements for forms, tables, and embedded content when those are part of the task.
  • Set document-wide details: check metadata and global attributes when the question concerns the document or attributes shared across elements.

These are ways to navigate the reference, not a substitute for checking an individual element’s definition. Similar-looking elements can carry different meaning, and the reference is where to confirm the intended use and available attributes.

Rank #4
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.