04.11.2017, 04:07
Please Note: This tutorial will be divided into different parts. They will be added as I create them. I have just started with this as I didn't want to completely finish this just to realize you guys aren't interested in this type of stuff. Having said that if you do want me to continue adding to this topic just leave a nice reply telling me what you'd like to see.
Part 1 - Introduction
Here I will be teaching you how to make a simple HTML and CSS website. Including some jQuery animations. Before you start with your website you must figure out a design and what you want to put on it. I have made a simple design which we will be recreating using HTML and CSS. Part 1 - Introduction
Now don't think you need to first buy a website to do this. This is not needed. You can simply create the website on your desktop, however this won't get your website online. So let's get started.
Part 2 - Creating the root folder of your website
What we first wanna do is go ahead and create a new folder on our desktop. I am gonna name it "root" as it is the root of our website but you may name it whatever you like. Inside this folder we will create a new Text Document. This is the file where we will be adding text, images, etc. to our website. So now we are going to open the file and click "Save as". We will be naming it "index" and giving it the extension of ".html". Once this is done we will create another file and Save it as "style" with the extension of ".css". Now that we've finished setting up the root of our website let's start to create the website itself. Open up your index.html file. Note: You can use whatever text editor you like. I am going to use Notepad for this but you may have Notepad++ or other text editors and please do feel free to use those if you want.
We're going to start with the very bare bones of HTML.Code:
<html> <head> </head> <body> </body> </html>
[center]• <area>
• <base>
• </br>
• <col>
• <command>
• <embed>
• <hr>
• <img>
• <input>
• <link>
• <meta>
• <param>
• <source>
Part 3 - Linking to your CSS file
Now I will tell you more about the <head></head> tags later but the <body></body> tags are where you put the visual things. Images, text and literally anything you want on your website. Let's start by adding whats called the header. Most website's use their header to put their logo, company name, as well as navigational links such as Home, About, etc. As shown in our picture we have a red rectangle the full width of the page, including "Sanchez is cool." in it. We will be creating this inside our body tag. We create the red rectangle using a <div> tag. This tag does need to be closed. We will be also giving the <div> tag an ID. This is so that we can separate the styling of this <div> from others. You can name the id whatever you want but since its the header I will be naming mine "header". Your code should now look just like this.Code:
<html> <head> </head> <body> <div id="header"></div> </body> </html>
Code:
<link type="text/css">
Code:
<link type="text/css" href="style.css">
Code:
<link href="images/picture.png">
Code:
<html> <head> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div id="header"></div> </body> </html>
Code:
#header
Code:
#header { code here }
Code:
#header { width: ; height: ; }
Code:
width: 100%;
Code:
height: 130px;
http://www.html-color-codes.info/ is a very good source to use for any occasion, even for VIP's who want colored call signs.
You can pick whatever color pleases you most. I will be choosing a nice dark maroon red color. Just click on the one you want and take the code and copy it inside you "background: ;" like this.Code:
background: #8A0808;
Code:
style.css <html> <head> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div id="header"></div> </body> </html> style.css #header { width: 100%; height: 130px; background: #8A0808; }
Part 4 - Website Title/Name
Now of course people can come to your website and think "Hmm... cool design. But what's it about?". So that's why we need to write the name of our website inside our #header <div>. For this we will again open up our index.html file. Here will separate <div> and </div> to fit things inside it, just like so.Code:
<div> </div>
Code:
<div> <h1>FreAkeD is cool</h1> </div>
Code:
#header > h1 { }
Code:
font-family: font, alternate font 1, alternate font2;
• Arial
• Century Gothic
• Tahoma
• Georgia
• Comic Sans MS
We're also going to give a color to the text and a size. For the text color you simply just use color: ;. For this we will again need to pick an HTML color. As I picked red I'm going to use white text which is simply #FFFFFF. • Century Gothic
• Tahoma
• Georgia
• Comic Sans MS
www.html-color-codes.info - HTML Colors
The font size is also what you may just expect, font-size: ;. I'm gonna give it the font-size of 64px; At this point you should now have this.Code:
#header > h1 { font-family: Century Gothic, Arial; font-size: 64px; color: #FFFFFF; }
Code:
text-align: center;
Code:
padding-left: 200px;
Code:
index.html <html> <head> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div id="header"> <h1>FreAkeD is Cool</h1> </div> </body> </html> style.css #header { width: 100%; height: 130px; background: #8A0808; } #header > h1 { font-family: Century Gothic, Arial; font-size: 64px; color: #FFFFFF; padding-left: 200px; padding-top: 25px; }