![]() |
|
Adding Images to a Web Page with HTMLIf you downloaded this tutorial the images that you need are in an htdocs/images folder located in the tutorial folder. If you are working online and haven't created your images folder within your htdocs folder do that now. If you haven't downloaded the zip file that contains the images for this site, do it now and move the images into the images folder. You can't complete this lesson if you don't have the images. Image Download Page Pictures or images are added to a web page using the image tag. In its most basic form the tag looks like this:
The image tag is one of the few HTML tags that does not use a closing tag. You'll use the source attribute to tell the the browser what image to use. It looks like this: src="".. We need to tell the browser what image to use and where to find it. The name of our image is strawberry.jpg and it is located in the images folder. Our image tag will look like this: Copy the code and paste it between the first set or left cell tags in the table.
Note: You should see a large strawberry on the left and on the right the words My First Web Page The code will look like this: Making AdjustmentsMore on Images Our header tag is not at the top of the page where we want it to be so we need to add an attribute to our table row tag. Vertical alignment can be applied to the row tag using our style sheet. Our header tag doesn't seem to be aligning properly so we want to set a width setting on our table. This can also be done using the style sheet. Open the style sheet and add these 2 lines of code. Save the changes to the style sheet and look at the web page in the browser. You may need to click the reload or refresh button to see the changes. The Heading should move to the top of the page and to the right. It will now center as we add paragraph text to the page.
Let's add a few paragraphs. Free Business Web HostingIf you are building a website for a business or organization, you can put it online for free at Microsoft® Office Live Small Business. You can create your website with HTML and upload it or use their tools and build it online. Take your business online with Microsoft® Office Live Small Business. Get started for FREE!
Create Web Sites without Learning Code
|
HTML Tutor HTML Editors Online Builder Tutorials Other Helps |
|
www.createasite.net ©2008 All Rights Reserved - Create a Site with HTML - Make a Free Website |