skunkbear
CSS already? Background Colors!

After you check out Your first webpage you can write a white web page with all sorts of black letters on it. A white background isn't always that fun though is it? You can easily change the color with a little style, CSS style that is. Forget the "CSS" is even there. It stands for cascading style sheets, which I'll tell you more about later. Just know that for now CSS is used to change the style of something on a webpage.
So in the first web page we included this code:
The reason our page is white is because it has a white body. The background-color of the body is set to white as the default, but you can change it by putting changing the background-color using style in the body tag like so:
That code will change the background color to blue. Just don't forget the quotes. Bascially it reads like: the body's style includes a background color set to blue. You can write common colors just like that in plain English. You can also pick any color you like at ColorPicker.com. It will let you select a color and then give you a color code that you can copy and paste. I picked a nice green color and put it in this code:
and here is the code again with the necessary HTML tags around it to make it a full webpage:


Make sure that if you are using a color code instead of plain English, you put a # sign before the color code. Now you can change the background of your page to any color you like!

submit to reddit

More: CSSstylebackground-color color code

Source: Seth | 2012-05-10
Your first webpage

Starting a website can be easier than you think. Websites are made up of webpages which are written in HTML. HTML is a set of codes used to build webpages. HTML stands for hyper-text markup language, which is crazy talk for a language that web browsers understand.
This is about as simple as the coding gets:
That's the code to write a web page that says "My first webpage" in the broswer tab at the top of the screen. Other than that, it's just a white background with black letters that say "Hello crazy world!". White is the default background color and black is the default text color. It looks like this:



HTML code is made from tags, which are just special code words inbetween 2 of these brackets: < >. So you basically have 4 tags in this code: html, head, title, and body.

<html> </html>
The first part of the code is the <html> tag. It tells the web browser that everything after it is written in HTML code. The HTML code ends at the bottom with the end tag </html>. So everything between <html> and </html> is html code.

<head> </head>
The next tag is <head>. The head is the mostly-invisible part of the webpage that gives more information about it.

<title> </title>
Another tag inside the head is the <title> tag, which puts the title of your webpage at the top of the web browser. You put the title between <title> and </title>.Then the head of page ends with </head>. Sometimes you'll want to put more codes in the head that give your page a description, keywords, and a document type, but none are absolutely needed to create a functional page at this point.

<body> </body>
The real meat of the page is put between <body> and </body>. You can just type text right between and it will show up on the webpage. You can also put in codes to show pictures, forms, or whatever else you want to share.

You don't need fancy software to create this webpage. Any text editor will do. On a Windows computer you can simply use notepad. Open it up and copy the code above into it. You can save your basic web page with file extension ".html" or ".htm" (don't include the parentheses). There's no real difference, so I'd say go with ".htm". Why add an extra letter if you don't have to?

Then you can open the file in whatever web browser you use. The most common browsers are Internet Explorer, Chrome, Firefox, Safari, and Opera. You can view the webpage on your computer but it is not on the world wide web. In order to do that, you would have to buy a domain name (like yourpage.com) and host the page on a server that you rent or buy. A server lets people share web pages on the internet.


submit to reddit

More: HTMLheadbody

Source: Seth | 2012-05-09

Recent Posts:

Repeating background image

Don't forget to comment your work

Layout your webpage using divs

Link it together

Images- the img tag