Useful html / css stuff!This page is dedicated for sample code for anyone who wants to learn HTML |
This is a "cheat sheet" template that you can use for experimenting: Click here to see the sample website in action |
Sample text explained: (Please note to remove the spaces in between < and > and whatnot. I need to do this or the page thinks I am trying to use the tags. 1. The < html > tag tells the web browser that we are using a HTML document. 2. The < head > element is a container for all the head elements. In here you can put things you do not wish to appear on your website. Things like the title tags, various meta information and styles. In the example here we have used CSS style to make the background pink. You can see we are making the entire < body > tag pink. 3. The < body > tag is the document body. Here you will put everything that is going to appear on the website. Things like images, text, links lists.. 4. The < h1 >, < h2 >, < h3 > and < h4 > tags are for making header text. < h1 > is the biggest and it goes smaller for every number you add. < h4 > is smaller than < h1 >. 5. < p > tags are used for paragraphs. It is useful for adding lots of text to your website. 6. The < img > tag is used for putting images on your website. You can see that src="" is used for refering to the image location. The location of this image is hopp.neocities.org/cute.gif. Since it is hosted on the same server as the website, we can simply refer to it as cute.gif. If you need to link an image from another website, put the entire link (including http://www.) into the src="" to link it. Like this: < img src="http://www.somepage.com/image.jpg" > 7. The < a href="" > < /a > simply links whatever is in between the tags as a link specified in href="". If I want to link an image to randomwebsite.com for example, I can do this: < a href="http://www.randomwebsite.com" > < img src="image.jpg" > < /a > or if I want to make a text into a clickable link: < a href="www.randomwebsite.com > This text will be clickable < / a > 8. Next, what I did is make a < marquee >. This simply makes text scroll from one side to the other. 9. Completly optional, but you can add a < footer > to your website. Usually people will write author, copyright info, links, contact info, and other handy stuff in the footer |