473,769 Members | 6,538 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

what's the deal with span tag and tables tags?

Does anyone know what is the way IE treats span tags(<span>) and table
tags(<tr>, <td>)? Should the <span> tag be encolsed in tds and trs if
it placed with other elements that are in a table? Can the span tag
itself contain table tags within it?

I have some scripting code and when I wrap the span in table elements
it does not find the html within the span. Here is an example....
<tr><td colspan="4" align="left"><s pan id="201294_3860 4_1">[some html
here including tds and trs]</span></td></tr>

var span = document.getEle mentById(spanId );
alert("the value inside span is " + span.innerHTML) ; // this is blank

And if I do not wrap the span in table tags like so....

<span id="201294_3860 4_1">[some html here including tds and trs]</span>

It finds the html in the span. But when I clear the contents of the
html and later try to put some other html in, I do not see the html on
the screen.

Any help would be appericated.

Jul 24 '05 #1
1 3143
developer wrote:
Does anyone know what is the way IE treats span tags(<span>) and table
tags(<tr>, <td>)? Should the <span> tag be encolsed in tds and trs if
it placed with other elements that are in a table? Can the span tag
itself contain table tags within it?


SPAN is inline so cannot contain block elements like TABLE, TR, TD, etc.
Jul 24 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2577
by: Alexander Ross | last post by:
I have an html snippet, and I want to remove any <span> tags that have a specific attribute (class=none) ex. The quick brown <span class="animal">fox</span> jumped <span class="none">over</span> the lazy dog should become The quick brown <span class="animal">fox</span> jumped over the lazy dog
44
3897
by: Mariusz Jedrzejewski | last post by:
Hi, I'll be very grateful if somebody can explain me why my Opera 7.23 (runing under linux) doesn't show me inner tables. Using below code I can see only "inner table 1". There is no problem with other browsers (I checked it under Konqueror). Thank you in advance for your help. Regards. /Mariusz <HTML>
9
7147
by: developer | last post by:
Does anyone know what is the way IE treats span tags(<span>) and table tags(<tr>, <td>)? Should the <span> tag be encolsed in tds and trs if it placed with other elements that are in a table? Can the span tag itself contain table tags within it? I have some scripting code and when I wrap the span in table elements it does not find the html within the span. Here is an example.... <tr><td colspan="4" align="left"><span...
6
1361
by: buc | last post by:
I have created a simple login keyboard with QWERTY keys with a user textbox and password textbox. When I press a key the text goes into both boxes....? The focus event on both boxes eval to TRUE. Why? this is driving me nuts, must be a simple answer. Here's code I named each letter button its own letter (The 'A' button is named A..Etc.) I shortened the A.Click, B.click code handles for this post because there were 26 of them. Private...
11
1137
by: Just Me | last post by:
I generated a help file when HML Help first cane out. At that time I hade to download the tool from MS to make the file. Is that still the case. I looked under VS tools and expected to find a tool there but I didn't. What are people doing now days to generate Help?
13
2705
by: Harlan Messinger | last post by:
What rules deal with attribute values with trailing spaces, or tags or attribute values with embedded newlines? Examples below: the HREF with embedded newline, the SRC with trailing spaces, and IMG tag spread over multiple lines. <a href="myself.html "> <img src="/images/picture.gif " width="80" height="65" alt="What, me worry?"></a>
11
20164
by: billa856 | last post by:
Hi, I have project in MS Access.In that I have one form in which there is one combobox .I want to know when I select an item from that combobox and click on submit button then it should open a report which filter data from table.So i only want specific data from table in report based on selection of item from combobox in a form. Can anyone help? Thanks.
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8876
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3567
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.