Is there a syntax for links with no text in Markdown?

13,108

Solution 1

Yes, here is the relevant section of the documentation:

AUTOMATIC LINKS

Markdown supports a shortcut style for creating “automatic” links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:

<http://example.com/>

Markdown will turn this into:

<a href="http://example.com/">http://example.com/</a>

Solution 2

I find this works with my IDE nicely, wrapping the link in an <a> tag:

<a>http://example.com/</a>
Share:
13,108

Related videos on Youtube

Marco Eckstein
Author by

Marco Eckstein

Diplom-Informatiker (equivalent to Master of Computer Science) Professional and hobbyist software developer Kotlin Java C# SQL Typescript/JavaScript Angular React Selenium WebDriver Spring Boot Clean code Musician / guitar player

Updated on September 26, 2022

Comments

  • Marco Eckstein
    Marco Eckstein over 1 year

    I want to write

    http://www.foo.com/ 
    

    and get a link with the URL as the text (e.g., in HTML output). I do not want to write

    [http://www.foo.com/](http://www.foo.com/)
    

    Is it possible?

    • realbart
      realbart almost 7 years
      Can you do this without the HTTP-prefix? (this is useful for a markdown-based wiki, here you want to mark some &lt;keywords&gt; als links...
  • Aprillion
    Aprillion almost 10 years
    FYI here on SO, plain text links work without additional tags http://www.foo.com/ => foo.com - in comments the text of the link is shorthened though. and <http://www.foo.com/> => <foo.com>
  • realbart
    realbart almost 7 years
    @Chris Can you do this without the HTTP-prefix? (this is useful for a markdown-based wiki, here you want to mark some &lt;keywords&gt; als links...
  • Chris
    Chris almost 7 years
    @realbart, most wikis provide a way to easily link to pages. I would read the documentation of whatever wiki you are using and see how it handles this.
  • Chris
    Chris over 4 years
    Does that actually link to http://example.com/? Or does it create a link to nothing? Or maybe to the current page?