4

I was able to add <a name="JavaEnvVar"></a> name-link inside (or top-of) the section related to "Setup Java Environment Variable" in my own answer. My answer post is a bit longer, and this "JavaEnvVar" section is located in much bottom side.

When I'm writing an answer for another question, I want to show a specific link into that specific bottom-side section "JavaEnvVar" in my own long answer. How can I do this?

See this LONG answer (I used this link https://stackoverflow.com/a/62874205/3553808 in above line, to link into the specific answer, this link was obtained from the "Share" option/button which is shown at bottom side of that answer)

In my long answer, the line which has "Java ENV-VAR (ENVIRONMENT VARIABLE)" is the "JavaEnvVar" section, that has the name-link which I displayed here in the top/first line of this post/question. I want to reach that "JavaEnvVar" section quickly, to show only the specific instructions related to How to setup JAVA_HOME ENV VAR (which was created by me with some specifics), and then it will be easy for a user to find it & understand it.

I'm trying to use such link (to specific-section of a answer), into my another answer here.

I have tried to use this https://stackoverflow.com/a/62874205/3553808#JavaEnvVar, but that does not work! it goes into top/beginning of my answer.

I created a DIV such as this: <div id="JavaEnvVar2" width="100%">SECTION-NAME:</div> but that also does not work, the Stack... parser removes it!

So

it seems (after using Firefox > main-menu > Tools > Web Developer > Inspector ) that Stack Exchange / Stack Overflow parser is removing the <a name="JavaEnvVar"></a> name-link from that section in the webpage HTML code! But when I use "Edit", then src of answer still shows the name-link.

4
  • 1
    There is no bug here. See What HTML tags are allowed on Stack Exchange sites?. As for fragment links, see Support anchor names in posts. Jul 15, 2020 at 9:28
  • @user289905 The 1st link in your comment can be considered to be a duplicate target. Jul 15, 2020 at 9:32
  • also related: meta.stackexchange.com/questions/349076/…
    – rene
    Jul 15, 2020 at 9:46
  • 1
    the link "Support anchor names in posts" posted by @user289905 is related to what i was looking for and also if id-link is supported or not , Or how to link to specific-section . No, the "What HTML tags are allowed..." link/page is not what i was looking for or wanted to know . THANKS to all for your helpful + quick answers . Hmm, sad, so still no-way to link into a specific-section into a specific-answer ! such would have been very very helpful . A safe name link can be forced by parser to have #existingLink-userID#-nameLink or #existingLink-nameLink, so it works & does not conflict.
    – atErik
    Jul 15, 2020 at 9:52

0

Browse other questions tagged .