Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
a Summer night - @865.15
Activity rating: Four Stars Posts & Arts: 62/1k.beats Random | Recent Posts | Guild Recents
News: :happy: Open the all windows! Your mind needs storms and air! :happy: Guild Events: 10: window

+  MelonLand Forum
|-+  Life & The Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  2 pairs of fake anchor tags I can't remove are messing up something on my page


« previous next »
Pages: [1] Print Embed
Author Topic: 2 pairs of fake anchor tags I can't remove are messing up something on my page  (Read 58 times)
Rubbereon
Sr. Member ⚓︎
****
View Profile WWWArt


⛺︎ My Room
SpaceHey: Friend Me!
Matrix: Chat!
XMPP: Chat!

Guild Memberships:
Artifacts:
NoSmoking!Hope, the silliest ink kittayyVisited on Melon's 10th Anniversary!Joined 2025!
« on: a Summer day » Embed

This is the weirdest thing I have ever seen, but I just updated my nekoweb site right now with a new flexbox and for some reason 2 pairs of stray empty anchor tags surround a comment and a div within the flexbox, so now it won't display correctly. When I remove them by hand via the inspect elements interface the flexbox actually displays correctly.




This happens even when I disable javascript (on the off-chance it is caused by that)

I literally have no clue how to fix that because on the nekoweb editor interface they're just missing as they should've been.


Might be related to this: https://forum.melonland.net/index.php?topic=5908.0
So, here's the link to my page, are these anchor tags there too for you or is it just me? If it's just me at least I can pretend they're not there because I know the website displays correctly to visitors.

A possible theory is that the SSI directives are bugging out, so the issue comes from Kicya, but how to contact them because I deleted discord as it's predatory and would rather not make a new one, so might as well ask is there another way to contact them in case that is the problem?

Logged

https://bettysgraphics.neocities.org/images/animals/cat%20695.gifFuzzy fwiendhttps://bettysgraphics.neocities.org/images/animals/cat%20696.gifhttps://bettysgraphics.neocities.org/images/animals/cat%20697.gif
https://rubbereon.nekoweb.org/img/penguin.gifLinux userhttps://rubbereon.nekoweb.org/img/penguin.gif
↓ All my web profiles are available on this website ↓
https://fursona.directory/@rubbereon :eyes:

Artifact Swap: pearl yappin kittaydiamond yappin kittayGreen Spiffowhite yappin kittay
Melooon
Hero Member ⚓︎
*****
View Profile WWWArt


So many stars!
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games
RSS: RSS

Guild Memberships:
Artifacts:
You're a Star!Flinstone VitaminI got robbed by Dan Q on Melonland!Always working hard!Known Apple shillcoolest melon on the web!
« Reply #1 on: a Summer day » Embed

I don't directly have an answer, but that A tag is showing up in an inspector from what I can see, so that's your browser trying to resolve the HTML and adding in what it thinks is correct.

If you just run a classic validator on the page https://validator.w3.org/nu/?doc=https%3A%2F%2Frubbereon.nekoweb.org%2Fhome.html there are a bunch of errors and unclosed tags. One of those bad tags is line 276 on a view-source of the page, that's where the phantom A tag shows up in your inspector "<!-- 3 -->".

It could be just a coincidence, normally modern browser are pretty good at working around errors, but sometimes they get things wrong. I'd fix all those basic syntax errors before trying to figure any more out since they could be the cause.

« Last Edit: a Summer day by Melooon » Logged


everything lost will be recovered, when you drift into the arms of the undiscovered

Artifact Swap: Bug!black n orange yappin kittayRed TulipLurbyThe Red PixelGame Boy Color!PlankGo dig, girl!
Dan Q
Hero Member ⚓︎
*****
View Profile WWWArt


I have no idea what I am doing
⛺︎ My Room
RSS: RSS

Guild Memberships:
Artifacts:
Dan Q Cruisin'I DIDN'T meet Dan Q on Melonland!Visited on Melon's 10th Anniversary!
« Reply #2 on: a Summer day » Embed

I've found the problem, but let me walk you through how because it's useful to understand!

First, I wanted to see the problem. From your screenshot I knew I was looking for a naked <a> before a <div class="plainlinks">. So I used by browser debugger to run:


Code
document.querySelectorAll('.plainlinks')

This then output to my debug console all of the things of class="plainlinks" on your page. With a little exploration I was able to find this one. Then I right-clicked it and chose "reveal in inspector" to jump across to the DOM inspector. Now I was seeing what you were.

Now the thing with the DOM, as you might already know, is that it's not the same as the HTML code you wrote. Here's the process that actually happens in your web browser:

1. It receives HTML (which is just text with funny symbols in it, amirite?)
2. It parses the HTML to build a DOM, which is a "tree" of elements and how they relate to one another
3. When you use "inspect element", it re-builds the HTML from the DOM... it's not the original HTML you wrote; more like... if you translated it to another language and back again: there's going to be differences!

Just for example, suppose I wrote this (horrible) code:


Code
<ul>
  <li>
    Hi
  <li>
    <p>
      There
      <div>
        Dan
      </div>
    </p>

When I look at it in my DOM inspector, it'll look like this instead:

Code
<ul>
  <li>
    Hi
  </li>
  <li>
    <p>
      There
    </p>
    <div>
      Dan
    </div>
    <p></p>
  </li>
</ul>

See the differences? The browser has interpreted my HTML in a few ways, e.g.:

1. I didn't close my <li>s or my <ul>, so it guessed where they should have been closed
2. I tried to put a <div> inside a <p>, which is forbidden, so it split my <p>...</p> into two paragraphs and put the <div> in-between them

This is important because it helps explain what you're seeing.

Now... try View Source. View Source is a different feature in your browser, and it doesn't show the stray <a>. So long as you're confident that it wasn't added by JavaScript (e.g. because you tried turning it off), this tells you that the stray <a> was put there by the parser. I.e. there's something you wrote in your HTML that didn't make sense to the browser... so it "corrected" it for you when it created the DOM.

A HTML validator might be able to help you find it... but I can give you a clue right off the bat! In your HTML source, a few lines before the <!--3--> comment, you've got the following code (line feeds added by me, for legibility):


Code
<a>
  <textarea cols="10" readonly>
    <a href="https://rubbereon.nekoweb.org/">
      <img src="https://rubbereon.nekoweb.org/img/button.gif"/>
    </a>
  </textarea>

Your code:

1. Starts an <a>
2. Inside that, starts a <textarea> (I don't know off the top of my head if it's invalid to put a textarea inside a link, but it's probably not what you meant!)
3. Inside that, starts another <a> - it's invalid to put a <a> inside a <a> and can result in exactly the kinds of problems you're facing
4. Adds the image, ends the inner [/url], and then ends the </textarea>
5. Does not end the outer <a>

There's a few problems here:

1. You open more elements than you close, leaving an <a> unclosed
2. (You probably didn't want that <a> in the first place!)
3. The contents of your textarea aren't escaped: amazingly, the browser's handling it pretty well, but the <a>-nesting is clearly too much for it!

Here's how that code should look, IMHO:


Code
<textarea cols="10" readonly>
  &lt;a href="https://rubbereon.nekoweb.org/"&gt;
    &lt;img src="https://rubbereon.nekoweb.org/img/button.gif"/&gt;
  &lt;/a&gt;
</textarea>

There might be other instances of invalid code like this. Run it through a validator to see if it can help, or run it through a beautifier to make unclosed elements "stand out" in the nesting order (just be aware that some beautifiers work by creating a DOM and then reverse-engineering to HTML, and as such can change the meaning of your code!)

Logged

https://danq.me/_q26t/badges/dan-q-88x31-lighter.gif https://danq.me/_q26t/badges/dan-q-88x31-peekaboo-scroller.gif https://beige-buttons.danq.dev/beige-buttons-88x31.gif https://embed-html.danq.dev/embed-html-88x31.gif

Artifact Swap: PolyamorousI met Dan Q on Melonland!Joined 2025!
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi
@000 MelonLand Editor Recent Edits Tenement Arcade Want to Login or Join ? Forum Art Hub Chat Webring Web Guides Graphics Catalogue Wiki Newsletters Image Stream
Melon's Sites TamaNotchi Textures PixelSea GifyPet MoMG Ozwomp Online Loom Videos Leaky Webring Melonking
Tools Melon Software ArtHub Embed Maker ML Passports
Outlinks Frutiger Aero Forum Onio Club m15o's Web Services 32Bit Cafe iMood Webrings Internet Phone Book HTML Energy Declarations Hackers & Designers
Zap!
Minecraft: Online
Who: PrinceDora, lithiumgamma