Fri, 2010-05-21 04:43
hi-yo
is there a way two divs can display the same text, where the text appears only once in the html?
or, is there a way to make a div mirror the contents of another div, without explicitly typing those contents twice into the html?
or, is there a non-javascript way to dynamically copy text from one element to another?
this does not have to be a css solution, it might be plain html.
thanks!
Fri, 2010-05-21 04:56
#1
The answer is that neither
The answer is that neither HTML nor CSS can do that. You need a programming language to do that, whether browser side or server side. Javascript can do it on the browser side, PHP, ASP, even Perl or C can do it on the server side.
HTML is called a markup language for a reason! It is NOT a programming language, which is of course why javascript was invented.