Skip to main content

Links : Empty Link, Broken Link, Navigation Link, Non-navigation Link

 

🔘 1. Empty Link

  • Definition: An <a> tag with no href or no visible content.
  • Example: <a></a> or <a href="#"></a>
  • Usage: Often unintentional or used as placeholders during development.
  • Problem: Bad for accessibility and SEO—screen readers can’t interpret them, and users get confused.

2. Broken Link

  • Definition: A link that points to a non-existent or unreachable resource.
  • Example: <a href="https://example.com/deleted-page">Click</a>
  • Usage: Usually accidental—caused by deleted pages, typos, or outdated URLs.
  • Problem: Leads to 404 errors, hurts user experience and SEO.

🧭 3. Navigation Link

  • Definition: A link used to move between sections or pages of a website.
  • Example: Menu items like <a href="/about">About Us</a>
  • Usage: Essential for site structure and user flow.
  • Benefit: Helps users explore your site and improves crawlability for search engines.

🚫 4. Non-Navigation Link

  • Definition: A link that doesn’t lead to a new page or section.
  • Example: <a href="#" onclick="toggleMenu()">Menu</a>
  • Usage: Often used to trigger JavaScript actions like opening modals or dropdowns.
  • Note: These should be used carefully—if there's no href, consider using a <button> instead for accessibility.

🧠 Summary Table

Link Type Has href Navigates? Common Use Case
Empty Link ❌ or empty Placeholder or coding mistake
Broken Link ❌ (fails) Outdated or incorrect destination
Navigation Link Menus, footers, internal links
Non-Navigation Link ✅ or ❌ JavaScript triggers, UI toggles

If you're building or testing a site, it's smart to audit for these regularly. Want a Selenium script to detect empty or broken links automatically? I can help you build one! 🛠️🌐

Follow on LinkedIn

Comments

Popular posts from this blog

Understanding Mistakes in Software Development: Errors, Defects, and Bugs

  Every software team uses the words “error,” “defect,” and “bug,” often interchangeably. But there’s real power in knowing exactly what each term means—and when it applies   1. Mistakes by Phase Phase What You Find What It’s Called Requirements & Design A mistake in the design or plan that doesn’t meet what stakeholders want. Defect Coding A coding or logic mistake in source code Error Testing & Execution An observable malfunction occurring during software execution or testing. Bug  🐞 1.1 Defect A defect is any flaw or mismatch in your requirements or design artifacts. It exists before any code runs. Example: You document “Users must enter a 4-digit PIN,” but stakeholders actually needed 6 digits. That spec mismatch is a defect . 1.2 Error An error is a mistake made while coding —a typo, wrong opera...

Keys.RETURN vs Keys.ENTER in Selenium: Are They Really the Same?

When you're automating keyboard interactions with Selenium WebDriver, you're bound to encounter both Keys.RETURN and Keys.ENTER . At a glance, they might seem identical—and in many cases, they behave that way too. But under the hood, there’s a subtle, nerdy distinction that can make all the difference when fine-tuning your test scripts. In this post, we’ll break down these two key constants, when to use which, and why understanding the difference (even if minor) might give you an edge in crafting more accurate and resilient automation. 🎹 The Subtle Difference On a standard physical keyboard, there are typically two keys that look like Enter: Enter key on the numeric keypad. Return key on the main keyboard (near the letters). Historically: Keys.RETURN refers to the Return key . Keys.ENTER refers to the Enter key . That’s right—the distinction comes from old-school typewriters and legacy keyboard design. Return meant returning the carriage to the beginning ...

What Is a Feature Flag?

  A feature flag (also known as a feature toggle) is a powerful software development technique that allows developers to enable or disable specific functionality in an application without changing the code or redeploying the software. 🧠 Core Concept Feature flags act like switches embedded in your codebase. They control whether a feature is active or inactive at runtime. This lets teams test, release, or hide features dynamically. 🚀 Benefits Safe Deployments : Deploy code with features turned off, then activate them when ready. A/B Testing : Roll out features to a subset of users to gather feedback. Quick Rollbacks : If something breaks, just flip the flag off—no need to revert code. Continuous Delivery : Decouple feature releases from code deployments for smoother CI/CD pipelines. User Segmentation : Tailor experiences for different user groups. 🧩 Types of Feature Flags Type...