Last time we left with a very simple website displaying nothing but a title in the titlebar, and text in the body. The file for that tutorial is available at my blog (listed at the bottom of this post,) and the tutorial is also available there. Anyway, this second tutorial will cover adding images, centering items, and changing fonts. Ok, let us begin!
First of all, I will tell you that the homepage for any site is named index (e.g index.html, index.htm, index.php). Web servers are programmed to display index first, which is why that is typically the homepage. I am going to use index.html for this tutorial. You can still use the same file as you did from the last tutorial if you like. I am going to begin with that same code, just the different file name.
We want to add an image to our website. This is done with the image tag
This image tag can go anywhere, the same as paragraphs can. I am going to place it directly beneath the text we added in the previous tutorial.
Now for centering things. Simply enclose the elements you wish to center horizontally inside center tags
That’s all it takes to horizontally center items! Now we’ll tackle fonts. To set fonts you use the font tag (surprise!)
And that’s it! You should now be able to center items, add images, and change fonts. Come back for our next tutorials! Right now we’re covering the basics, but we will get into CSS, JavaScript+jQuery, and even PHP.