Txt function like <IMG SRC> ?

H

Hugh Newbury

Is there a function in HTML that will get a page to load a chunk of text
in exactly the same way that <IMG SRC> loads pix?

Hugh
 
J

Jukka K. Korpela

Is there a function in HTML that will get a page to load a chunk of text
in exactly the same way that <IMG SRC> loads pix?

No. Things like that are handled using server-side includes (or
preprocessing).
 
D

dorayme

Hugh Newbury said:
Is there a function in HTML that will get a page to load a chunk of text
in exactly the same way that <IMG SRC> loads pix?

Not really, you would normally use server side includes for this.

Perhaps the closest you can get to using HTML to do this is an inline
class attribute with CSS that uses the 'content' property and the
:before and :after pseudo-elements; not much use generally, but maybe
useful for special purposes.

And, of course, for sighted visitors, you can make a pic of text (make
it big enough so none of those visitors have trouble)!
 
R

richard

Is there a function in HTML that will get a page to load a chunk of text
in exactly the same way that <IMG SRC> loads pix?

Hugh

<object>

create a page with the text on it.
At the point where you want the text to show, insert the tag.
enclose the tag in a division container and style the division.
 
J

Jukka K. Korpela

create a page with the text on it.
At the point where you want the text to show, insert the tag.
enclose the tag in a division container and style the division.

If you had actually tried it, you would know that styling the division
has no impact on the style of the text.
 
R

Ray_Net

<object>

create a page with the text on it.
At the point where you want the text to show, insert the tag.
enclose the tag in a division container and style the division.

I think that he just want a kind of
<include>\\alltextfiles\mytextfile.txt</include>
 
R

richard

I think that he just want a kind of
<include>\\alltextfiles\mytextfile.txt</include>

that's what the object tag is and does.
include is server side and used in php.
object needs no server.
 
J

Jukka K. Korpela

Badly out-of-date page, judging by the browser versions it claims to
work with.

Last-Modified: Wed, 25 Oct 2006.

But that's really not the point. The point is that inclusion of content
with <object> (or with <iframe>) will not "get a page to load a chunk of
text in exactly the same way that <IMG SRC> loads pix". It simply
includes an external document, rendered in an isolated box.
 
R

richard

Badly out-of-date page, judging by the browser versions it claims to
work with.

So? Works just fine with firefox 9.
Even though many tags, such as <b> have been deprecated, they still
function.
 
R

Ray_Net

that's what the object tag is and does.
include is server side and used in php.
object needs no server.

The question was not to use it in php but:
"Is there a function in HTML..."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top