Skip to main content
added 219 characters in body
Source Link
Mori
  • 191
  • 7

Sample code:

<!DOCTYPE html>
<html>
  <head>
    <title>Another Website Name</title>
  </head>
  <body>
    <h1>Fruits</h1>
      <h2>Apples</h2>
      <h2 id="target">Bananas</h2>
  </body>
</html>

What is the right text link to target the bookmark on another website? Is it enough:

<a href="http://www.example.com/fruits#target">Bananas</a>

Or should I mention the page title and website title as well? If so, should I use hyphens:

<a href="http://www.example.com/fruits#target">Bananas - Fruits - Another Website Name</a>

Or colons:

<a href="http://www.example.com/fruits#target">Another Website Name: Fruits: Bananas</a>

Or pipes? Or a combination of them? Is there a standard to follow? What is the best practice?

Update: It might clarify if I give a real example. Consider the following bookmark:

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Using_CSS_flexible_boxes#Flex_item_considerations

I wonder what text link you would use for this example.

Sample code:

<!DOCTYPE html>
<html>
  <head>
    <title>Another Website Name</title>
  </head>
  <body>
    <h1>Fruits</h1>
      <h2>Apples</h2>
      <h2 id="target">Bananas</h2>
  </body>
</html>

What is the right text link to target the bookmark on another website? Is it enough:

<a href="http://www.example.com/fruits#target">Bananas</a>

Or should I mention the page title and website title as well? If so, should I use hyphens:

<a href="http://www.example.com/fruits#target">Bananas - Fruits - Another Website Name</a>

Or colons:

<a href="http://www.example.com/fruits#target">Another Website Name: Fruits: Bananas</a>

Or pipes? Or a combination of them? Is there a standard to follow? What is the best practice?

Sample code:

<!DOCTYPE html>
<html>
  <head>
    <title>Another Website Name</title>
  </head>
  <body>
    <h1>Fruits</h1>
      <h2>Apples</h2>
      <h2 id="target">Bananas</h2>
  </body>
</html>

What is the right text link to target the bookmark on another website? Is it enough:

<a href="http://www.example.com/fruits#target">Bananas</a>

Or should I mention the page title and website title as well? If so, should I use hyphens:

<a href="http://www.example.com/fruits#target">Bananas - Fruits - Another Website Name</a>

Or colons:

<a href="http://www.example.com/fruits#target">Another Website Name: Fruits: Bananas</a>

Or pipes? Or a combination of them? Is there a standard to follow? What is the best practice?

Update: It might clarify if I give a real example. Consider the following bookmark:

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Using_CSS_flexible_boxes#Flex_item_considerations

I wonder what text link you would use for this example.

Source Link
Mori
  • 191
  • 7

External link to a bookmark

Sample code:

<!DOCTYPE html>
<html>
  <head>
    <title>Another Website Name</title>
  </head>
  <body>
    <h1>Fruits</h1>
      <h2>Apples</h2>
      <h2 id="target">Bananas</h2>
  </body>
</html>

What is the right text link to target the bookmark on another website? Is it enough:

<a href="http://www.example.com/fruits#target">Bananas</a>

Or should I mention the page title and website title as well? If so, should I use hyphens:

<a href="http://www.example.com/fruits#target">Bananas - Fruits - Another Website Name</a>

Or colons:

<a href="http://www.example.com/fruits#target">Another Website Name: Fruits: Bananas</a>

Or pipes? Or a combination of them? Is there a standard to follow? What is the best practice?