Another Noob Question: Functional equivalent of <img> for HTML file?

P

(Pete Cresswell)

If I put this in an HTML document:
<img src="../Pix/40th/Hugh Evans.jpg">
a picture of Hugh Evans appears inline in the document.

I'd like to do the same kind with another HTML document instead
of a a graphic. i.e. not just insert a link, but have the entire
document rendered right then and there...

Is there any hope?
 
D

David Dorward

(Pete Cresswell) said:
If I put this in an HTML document:
<img src="../Pix/40th/Hugh Evans.jpg">

The alt attribute is required, spaces in URIs must be represented as "%20"
not " ", and its usually a good idea to specify height and width attributes
(so the browser can arrange the right amount of space for the image before
it receives the file).
I'd like to do the same kind with another HTML document instead
of a a graphic.

The iframe element does exist (although not in HTML 4.01 Strict, which, in
my experience, is recommended by the majority of experts), but it comes
with a host of problems and should be avoided. In almost every case you
would be better off extracting the body of the document and inserting the
HTML there directly into the "outside" document.
 
K

Kim André Akerø

(Pete Cresswell) said:
If I put this in an HTML document:
<img src="../Pix/40th/Hugh Evans.jpg">
a picture of Hugh Evans appears inline in the document.

I'd like to do the same kind with another HTML document instead
of a a graphic. i.e. not just insert a link, but have the entire
document rendered right then and there...

Is there any hope?

A tad reluctant, I'll say: <iframe>
 
N

Neal

If I put this in an HTML document:
<img src="../Pix/40th/Hugh Evans.jpg">
a picture of Hugh Evans appears inline in the document.

I'd like to do the same kind with another HTML document instead
of a a graphic. i.e. not just insert a link, but have the entire
document rendered right then and there...

Is there any hope?


You could have the content of the body element saved as a separate file
and use PHP or SSI include to add the content to both pages.
 
R

Richard

(Pete Cresswell) said:
If I put this in an HTML document:
<img src="../Pix/40th/Hugh Evans.jpg">
a picture of Hugh Evans appears inline in the document.
I'd like to do the same kind with another HTML document instead
of a a graphic. i.e. not just insert a link, but have the entire
document rendered right then and there...
Is there any hope?
--

Directly in html? No way possible.
BTW no spaces allowed in image names.
 
R

Richard

David said:
(Pete Cresswell) wrote:
The alt attribute is required, spaces in URIs must be represented as
"%20" not " ", and its usually a good idea to specify height and width
attributes (so the browser can arrange the right amount of space for the
image before it receives the file).

Will you quit with the damn nit pickin about the "alt" stuff?
He was just using the tag as an example, nothing more.
Now if you want to nit pick.....do it this way:
Your tag should read <img
src=http://www.example.com/pix/40th/Hugh-Evans.jpg alt="description of
picture here">

In reality, there will be quotes around what is shown as a link here.

Capiche?
 
J

Jukka K. Korpela

Richard said:
Will you quit with the damn nit pickin about the "alt" stuff?

Hopefully not.
He was just using the tag as an example, nothing more.

When setting an example, set a good example.
Now if you want to nit pick.....do it this way:
Your tag should read <img
src=http://www.example.com/pix/40th/Hugh-Evans.jpg
alt="description of picture here">

Hopefully not. That's bogus. In addition to being invalid markup, it
presents a complete wrong idea of what an alt attribute means and how
it will be used.

So you would really need to read and understand a lecture on alt
attributes. You will find some of them if you just hang around for a
while, read the good stuff here, and avoid teaching others in matters
you don't understand at all.
 
R

Richard

Hopefully not.
When setting an example, set a good example.
Hopefully not. That's bogus. In addition to being invalid markup, it
presents a complete wrong idea of what an alt attribute means and how
it will be used.
So you would really need to read and understand a lecture on alt
attributes. You will find some of them if you just hang around for a
while, read the good stuff here, and avoid teaching others in matters
you don't understand at all.

Obviously you work in a 6x6 cubical office all day and never get out of if.
No sense of humor at all.
 
D

Dylan Parry

Richard said:
Obviously you work in a 6x6 cubical office all day and never get out of if.
No sense of humor at all.

So your crap HTML advice which advocates incorrect and generally poor
usage is supposed to be humorous? I guess I must be watching the wrong
sitcoms.
 
P

(Pete Cresswell)

RE/
You could have the content of the body element saved as a separate file
and use PHP or SSI include to add the content to both pages.

Sounds like IFrame is a loser.

Since I'm creating these pages programatically, Ill write a little more code to
retrieve the body instead of trying to fight nature.

Thanks for everybody's prompt assistance.

BTW, "Hugh Evans.jpg" really does work in a link..... It was an inadvertant
violation of my own personal standards and probably won't pass validation...but
it did work when I tried it. IE 6.0.
 
L

Leif K-Brooks

Dylan said:
So your crap HTML advice which advocates incorrect and generally poor
usage is supposed to be humorous? I guess I must be watching the wrong
sitcoms.

Don't you see? He's like a village idiot! Watch and laugh.
 
N

Neal

Pete Cresswell:
BTW, "Hugh Evans.jpg" really does work in a link..... It was an
inadvertant
violation of my own personal standards and probably won't pass
validation...but
it did work when I tried it. IE 6.0.

With all due respect, I could take a dump on a piece of paper, scan it,
translate it to ASCII, and IE would probably find a way to render it. If
my college English teacher was as forgiving, I wouldn't have gotten a D on
my first paper.
 
N

nice.guy.nige

While the city slept, Richard ([email protected]) feverishly typed...
Will you quit with the damn nit pickin about the "alt" stuff?
He was just using the tag as an example, nothing more.

Looks like Richard has the alt.html crystal ball this week! ;-)

Cheers,
Nige
 
J

Jeffrey Silverman

Partially true, the file name may contain spaces, but the URL may not.
Spaces must be represented as %20.

But it is still a space, no matter how encoded
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top