answersLogoWhite

0


Best Answer

There are many ways to do such a thing.

One would be to give the header a unique id on the home page and use CSS specify it's background image. Of course, if you're doing that, you might as well just add an image tag to it anyway.

If you're looking to add an image on that particular page, without modifying the element into which it's inserted, you could also do it using javascript:

<script type="text/javascript">

var URL = window.location.pathname;

var pageName = URL.substring(URL.lastIndexOf('/') + 1);

if(pageName == 'index.HTML'){

header = document.getElementById('pageHeader');

header.innerHTML = header.innerHTML + '<img src="headerimage.jpg">;

}

</script>

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you display a header image only on the homepage without using php?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is image that appears for webpage on top of browser called?

A Logo or a Header.


Can you insert an image in table header in HTML?

Yes, you can insert an image anywhere in the code. You just have to insert the img tag before the area you want to insert it.


Why the image not come sometime in HTML?

sometimes if the system does not support image formats like GIF,JPEG,PNG... then the HTML will not display the image.and also if the image is developed using flash player then system must support flash player. sometimes if the location of image source is not correct means then image will not display.


How can you insert an image as a background if it is stored anywhere in the system?

You can display an image with HTML as long as you know the location of the image. You use the image tag like this: &lt;img src="...\anywhere\image.jpg" width="100" height="100" alt="My Image" /&gt;.


How do you make a skull on HTML?

HTML is a language that the browser understands to display a document (page) You cannot create a skull using HTML. If you want to create a skull you need a program like Paint Shop or any image editor. You can place a picture of a skull on the page using the following HTML. Using HTML to display images you use the &lt;img&gt; tag. To display an image on a page, you need to use the (source attribute) src= The value of the src attribute is the URL of the image (skull) you want to display on your page which means that the image you want to display must be uploaded to a server, and have a web address (URL). The URL for the image points to the location where the image is stored on the server. It should look like this: &lt;img src="http://www.theURLfortheimage.com/Skull.jpg"&gt; Broken down it means &lt; img source = the address (URL) of the image is located / (for the name of the image) skull.jpg&gt;

Related questions

How do you display an image on the homepage only using CSS or HTML?

HTML only can be used to display an image on homepage. Image SRC tag can be used to publish it.


How do you put graphics in Blogger?

You can add a Gadget to put graphic images in blogger. You can upload or put the photo URL of the image you want to display in the gadget. You can also add graphics into your header by going into the "design" and click "header". Hope this helps.


How can you populate your Google homepage with different stuff?

To add a background click on Change Background Image (on Google homepage), sign in to Google (or create an account) and select the image you want. Note you have to be on the same country version of Google and signed in to see the image.


What is image that appears for webpage on top of browser called?

A Logo or a Header.


Can you insert an image in table header in HTML?

Yes, you can insert an image anywhere in the code. You just have to insert the img tag before the area you want to insert it.


Why did you hide the image icon from the homepage?

i need answer to my question, please. i need answer to my question, please.


How do you use a different header for the image gallery page on your Wordpress blog?

Click the appearance button located on the left hand side of your dashboard to change your header.


How do you find a pictures HTML?

Using HTML to display images you use the tag. To display an image on a page, you need to use the (source attribute) src= The value of the src attribute is the URL of the image (skull) you want to display on your page which means that the image you want to display must be uploaded to a server, and have a web address (URL). The URL for the image points to the location where the image is stored on the server. It should look like this: Broken down it means < img source = "the address (URL) of the image is located / (for the name of the image) Youri_picture.jpg">


How you make a HTML code of your photo?

Using HTML to display images you use the tag. To display an image on a page, you need to use the (source attribute) src= The value of the src attribute is the URL of the image you want to display on your page which means that the image you want to display must be uploaded to a server, and have a web address (URL). The URL for the image points to the location where the image is stored (the server)It should look like this: Broken down it means < img source = the address (URL) of the image location/ (for the name of the image) yourimage.jpg>


Since there is so much electricity in the air is it possible for a satellite to transmit an image randomly without using an electronic device to display it and could it send an image into a street?

No. If for no other reason, there is no air where the satellites orbit.


If the display creates an image by passing light through a medium what display technology is it using?

transmissive


Advanteges of liquid crystal display?

Image is clear