August 9, 2010

Ghost code?Regarding missing tag in html file

Question by Gin

I’m having a problem regarding html.I got a html script contains no </body> nor </html> closing tags in the file yet when its source code view in the browser,both the </body> and </html> closing tags appears in the source code together with a <div>...</div> block of code.
How could this possible to happen?

Answer by Starx

Sometimes, if you are using web authoring applications like dreamweaver, netbeans, …. etc, they complete your un-complete tags before publishing them.

And, nowadays browsers are smart enough to correct those mistakes, while rendering the HTML file.

May be you will not get the same result in old browsers like IE6, FF1…….. Try it…

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!