question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

replacing "href" with "#"

See original GitHub issue

Challenge Make Dead Links using the Hash Symbol has an issue. User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36. Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:


<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;
  }

  .smaller-image {
    width: 100px;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a #="http://www.freecatphotoapp.com">cat photos</a>.</p>

<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back. ">

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

I replaced “href” with “#” as noted in the instructions for the line that reads: “

Click here for <a #=“http://www.freecatphotoapp.com”>cat photos.

” and it does not register as me having done so.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:28 (7 by maintainers)

github_iconTop GitHub Comments

13reactions
phoenixwarriorcommented, Aug 9, 2016

@erictleung Yea for me it was the last sentence that I found to be the confusing and misleading part. “Replace the value of your a element’s href attribute with a #, also known as a hash symbol, to turn it into a dead link.” Here is how,as someone who is new to code, this sentence reads to me. within my “a” element line of code, there is a “href attribute” And I need to replace that with a hash(#). My first thought is not to replace the quoted link url, but rather the letters href.(of the two which has the attributes of being href?) And secondly, the instruction says I am causing the link url to be dead,not delete the link all together. And so like commenting something out, one adds --><–around the code, so the code stays if one wish to un-comment it, And so I thought it would be so here to,replace href with # and that will cause the link to be dead, and if later I want to make it active again,I would replace # with href. Obviously deleting the link url, I cant do that unless I first find the url again. As a new coder I wouldn’t have thought to do or risk that happening.

I think this is easy enough to clarify within the instructions though, it could read: “A href attribute is the quoted link url itself within the “a” element. Replace the value of your a element’s href attribute with a #, also known as a hash symbol, to turn it into a dead link.”

Or, "Replace the value of your a element’s [quoted link url] with a #, also known as a hash symbol, to turn it into a dead link. make sure not to replace the “”.

12reactions
SageGramcommented, Dec 15, 2016

screenshot from 2016-12-14 20-24-47

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to replace href link using javascript - jquery - Stack Overflow
I want to replace some specific links with another link. what I wish to do here is find the href attribute of <a>...
Read more >
How to change href link using JavaScript or JQuery? - deBUG.to
You have URL but you want to change it to new URL by clicking some button. Or without having href attribute or you...
Read more >
How to Change href Attribute of a Hyperlink Using jQuery
Answer: Use the jQuery .attr() Method ... You can use the jQuery .attr() method to dynamically set or change the value of href...
Read more >
Replacing anchor links with JavaScript - The Art of Web
Anchors in HTML are essentially bookmarks within a page that can be targeted directly by adding an anchor reference starting with '#' to...
Read more >
Difference between window.location.href ... - GeeksforGeeks
The replace function is used to navigate to a new URL without adding a new record to the history. As the name suggests,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found