YogeshChauhan.com

Make sure your links have descriptive text

April 7, 2021

You must have seen this error/flag in Lighthouse audit report.

Lighthouse audit showing links don't have descriptive text
Source: web.dev

Lighthouse flags the following generic link text:

  • learn more
  • click here
  • start
  • click this
  • go
  • this
  • more
  • right here
  • here

For example, DON’T DO THIS ❌

wrong method to add links

Why not?

The links are ambiguous as it doesn’t tell the users where it will lead them. It might be a spam and that’s why it should not be done that way.

DO THIS ✅

right method to add links

Why so?

The links are NOT ambiguous anymore as it DOES tell the users where it will lead them. They know before clicking that they will go to Google website or Dreamhost website.

Some best practices defined by Web.dev

  • Use link description relative to the page URl. For e.g. use Google’s Homepage for google.com
  • Aim for a few words in the link descriptions.
  • Pay attention to your internal links descriptions too. It will help in SEO.
  • Don’t use the page’s URL as the link description.
dreamhost

Most Read

#1 How to check if radio button is checked or not using JavaScript? #2 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #3 How to uninstall Cocoapods from the Mac OS? #4 How to Use SQL MAX() Function with Dates? #5 How to add Read More Read Less Button using JavaScript? #6 PHP Login System using PDO Part 1: Create User Registration Page

Recently Posted

Apr 7 Solution for “Yarn build: Failed because of a stylelint error” Apr 7 Make sure your links have descriptive text Apr 7 How to add Laravel to WordPress using Sage theme (and install Tailwind CSS)? Apr 2 How to create a sidebar using pure CSS? Apr 1 How to switch dark and light themes using pure CSS? Apr 1 How to calculate elapsed time in JavaScript?

You might also like these

A Step by Step Guide to Make RSS in XML For Any Website or Blog For FreeMiscWordPress: How to add a Search Icon in Menus with toggle effect using jQuery?jQueryAttributes and Properties in JavaScript and HTMLHTMLContainers 101: What are containers?MiscSQL GROUP BY StatementSQL/MySQLHow to create a Random Hex Color generator using JavaScript?JavaScriptHow to list all PHP variables to debug the script?PHPIntroduction to Angular modules Part 3: NgModules vs JavaScript modules and Angular librariesAngularThe Complete Basic Explanation of PHP SessionsPHPCREATE TABLE Examples in PostgreSQLPostgresHow to display modal from bottom to top using CSS and JavaScript?CSSThe actual difference between indexOf() and search() in JavaScriptJavaScript