0

Firebug displays code in browser that differs from the code that I wrote.

<a href="#" class="info">Przejdź dalej</a>

First set of code is what I wrote

Second code is what Firebug's interpretation of my code is.

<div class="oferta_option">
    <a class="oferta" href="silownia.php"> 
        <span class="text_oferta">Siłownia 
            <span class="italic_olymp">OLYMP</span>
        </span>
        <span class="view view-first">
            <img src="images/image_02.jpg" alt="img" />
            <span class="mask">
                <!-- <h2>Title</h2>  -->
                <p class="info_about">
                    Tutaj możesz znaleźć informacje o strefach rozmieszczenia sprzętu, zdjęcia sprzętu oraz cennik siłowni.
                </p>
                <a class="info" href="#">Przejdź dalej</a> 
            </span>             
        </span> 
    </a>
</div>

Firebug.

    <div class="oferta_option">
    <a class="oferta" href="silownia.php"> 
        <span class="text_oferta">Siłownia 
            <span class="italic_olymp">OLYMP</span>
        </span>
        <span class="view view-first">
            <img src="images/image_02.jpg" alt="img">
            <span class="mask">
                <!-- <h2>Title</h2>  -->
                <p class="info_about">
                    Tutaj możesz znaleźć informacje o strefach rozmieszczenia sprzętu, zdjęcia sprzętu oraz cennik siłowni.
                </p>
            </span>
        </span>
    </a>

    <a class="info" href="#">Przejdź dalej</a> 
</div>
racecarjonathan
  • 1,244
  • 1
  • 11
  • 22
aliendev
  • 23
  • 8
  • 3
    I think down in the spans. Could be that firebug does not like that you place block elements (p) inside of inline elements (span). – Chrisissorry Nov 06 '14 at 20:09
  • 1
    http://stackoverflow.com/questions/11314668/what-elements-can-a-span-tag-contain-in-html5 – A. Wolff Nov 06 '14 at 20:12
  • okok but it isn't reason why is other code on www in firebug – aliendev Nov 06 '14 at 20:23
  • 1
    Your HTML is (probably) invalid. What Firebug is showing you is what it's *interpreting* it as. Or rather, Firefox is interpreting your HTML code and Firebug is just showing what the browser is rendering. – gen_Eric Nov 06 '14 at 20:38
  • Its not about firebug all browsers would render it in this way only – Ninja Nov 06 '14 at 20:50

2 Answers2

3
<a> tag can't be inside another <a> tag

<a id='f'>first
    <a id='s'>2nd
    </a>
</a>

rendered as

<a id="f">first
   </a>
<a id="s">2nd
   </a>
Ninja
  • 2,050
  • 1
  • 23
  • 27
1

"paragraph" is not allowed inside "span" tags according to the HTML specs.

  • firebug just reads the code displayed in the browser that is all it doesn't modify your code. – Ivan Jovanovic Nov 06 '14 at 20:23
  • the browser can though. – Ivan Jovanovic Nov 06 '14 at 20:24
  • i change p on span on other class and nothink all the time same effect – aliendev Nov 06 '14 at 20:26
  • let me explain how this works...the browser compiles the html file and if the html protocol is broken it either fixes it (if it has the functionality) or continues past it. So to help you: get

    Tutaj możesz znaleźć informacje o strefach rozmieszczenia sprzętu, zdjęcia sprzętu oraz cennik siłowni.

    out of span
    – Ivan Jovanovic Nov 06 '14 at 20:40