Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8282031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:14:07+00:00 2026-06-08T10:14:07+00:00

When i try to add a <img> tag, IE8 automatically add a ‘ Empty

  • 0

When i try to add a <img> tag, IE8 automatically add a ‘Empty Text Node‘ after the image tag.

HTML :-

<html>
<head>
    <title>Railway Services</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="shortcut icon" href="img/icon.png" />
    <link rel="stylesheet" href="css/styles.css" />
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/script.js"></script>
</head>
<body>
    <div id="header">
        <div id="wrapper">
            <div class="logo">
                <img src="img/logo.png"/>
            </div>
        </div>
    </div>
    <div id="page" class="homePage">
       <div id="wrapper">
          <h1>Home Page</h1>
       </div>
   </div>
   <div id="footer">
      <div id="wrapper">
            <p class="copyRight">Copyright&#169;2012 Railway Services. All rights reserved</p>
      </div>
    </div>
</body>
</html>

styles.css :-

@CHARSET "ISO-8859-1";
body{
   margin:0px;
   padding:0px;
   font-size:12px;
   color:#123456;
   font-family:verdana,_sans,arial;
   text-align:center;
}
#wrapper{
   width:98%;
   margin:0 auto;
}
#page{
   float:left;
   width:100%;
}
p{
   margin:0px;
   padding:0px;
}

/**********************HEADER*********************/

#header{
   float:left;
   width:100%;
}
.logo{
   float:left;
   width:20%;
   height:150px;
   cursor:pointer;
}
.logo img{
   width:100%;
   height:100%;
}

/************************HEADER END***************/

/************************FOOTER*******************/

#footer{
   float:left;
   width:100%;
}

/***********************FOOTER END****************/

See this image

in IE8 console

In the above image you can see the IE generates Empty Text Node after the <img> tag.

I can’t found why IE generate empty text node.Can anybody help me..?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T10:14:11+00:00Added an answer on June 8, 2026 at 10:14 am

    There is a line break and some whitespace for indentation after the image tag, which leads to creating an empty text node.

    If you write your code like that:

    <div class="logo"><img src="img/logo.png"/></div>
    

    you will not have the empty text node any more.

    Since it’s really IE specific, I think it’s just a bug of the parser.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm try to wrap text around a image and I'm using an img class
I try to add a to an HTML-Document and link it to an image
I try to add dots between the page title and the page number in
I try to add Message.framework to my project frameworks directory. After that I compile
I have this text file filled with some html code; <span>test</span><p>welcome</p> <span>Guest</span><p><img class=insertedImage src=/dynamictemplate/uploads/temp/167-5-IMG_0755.JPG
I need a real <img> HTML tag in my view Sencha. I've retrieved this
i try to add facebook like button on my root domain that will like
I try to add the android coverflow in my own android projet when myt
I try to add a class to a td-element using javascript with the internet
I try to add a class to a link with jquery <a rel=/Career/ href=/Career/></a>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.