Help - Search - Members - Calendar
Full Version: HTML
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
deb1
Hello,
can someone please tell me how to make more than one images appear side by side in a html document ?
pandy
You don't need to do anything at all. Just place them after each other in the source. In a row or one under the other doesn't matter. IMG is an inline (text level) element, so images behave like words on a line. For them not to do so you must have done something, placed them each in a DIV or similar.
deb1
i don't want it one under the other . i want it side by side .
When i try to do it , it doesn't appear side by side. so can
you please show me the coding where the images can be placed beside each other.
Not one under the other ... if that makes sense at all.
pandy
That wasn't what I said. I said you can put the IMG tags one after the other or under each other when you type the HTML. They will show side by side in the browser, just like words. This is because they are inline elements. You have done something that changes that behaviour.

https://htmlhelp.com/reference/html40/inline.html

HTML
<body>

<p>
These words will show side by side and so will the images below.</p>

<img src="https://htmlhelp.com/icon/wdglogo.gif" alt="WDG"> <img src="https://htmlhelp.com/icon/wdglogo.gif" alt="WDG"> <img src="https://htmlhelp.com/icon/wdglogo.gif" alt="WDG">

<p>
So
will
these
words
and
these
images.</p>

<img src="https://htmlhelp.com/icon/wdglogo.gif" alt="WDG">
<img src="https://htmlhelp.com/icon/wdglogo.gif" alt="WDG">
<img src="https://htmlhelp.com/icon/wdglogo.gif" alt="WDG">

</body>



Click to view attachment
deb1
just tried it by myself just now , it worked . so thank you smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.