hello everyone
Here is the first chapter of this tutorial for beginners that will teach you to create your own website!
This tutorial will let you learn how to create a website from A to Z.
You'll discover 2 computer languages, called XHTML & CSS. They are the ones that you will create your website.
First let me explain what's xhtml and css:
To create a website, you must indicate
information to the computer. It is not enough
Simply type the text that will be in its site,
must also be able to place the text, insert images,
make connections, etc. ...
To explain to the computer what you want, it will
have to use a language he understands.
There are languages that are used to create programs, such as C + + or Java. These languages
are still complex and for people who already have some computer knowledge.
XHTML and CSS, they serve precisely create websites, and they have been created so
be simple to use. My role will be to teach you how to use them.
It is true that when I tell you that you will learn 2 languages at once, you wonder if it is not already too much for you.
Do not worry, you will report as and as everything was very well thought out. Each of these 2 languages used to do something specific, and the two complement each other naturally in the end give a website:
XHTML: it stands for eXtensible HyperText Markup Language. Between us, if you do not remember what it means, it will not prevent you from sleeping .
This XHTML is one with which you type the content of your website. It contains logical information: for example you say "This is my title, this is my menu, there is the main text of the page, here is a picture etc. etc. ...".
You may have also heard of HTML. In fact, XHTML and HTML are very similar and can both be used to create web pages. They are virtually identical. XHTML works on rules, however a little more strict than HTML.
In short, if you know programming in XHTML, then you know how to program in HTML. That's why we study this tutorial in XHTML.
CSS: it is the abbreviation for Cascading Style Sheets ( "Stylesheet"). This language serves only to present the web page. In CSS we say: "My credentials are in red and underlined, my text is in Arial, my name is centered, my menu has a white background ..." etc. etc..
With this language, we will be able to quickly and simply the layout of your site. We may as well give it a nice presentation, without being experts in graphics (and they're not alone, because me too my knowledge of design is bellow 0)
In summary, it uses:
XHTML to write the content of our web pages.
CSS to present the content.
These languages are complementary, the two go hand in hand. If you remember that XHTML is used to enter the content and CSS to present this, then believe me, you already understand 95% of principle!
In the first part of this tutorial, however, we will not talk about following CSS. It will not do that XHTML, because that is where to start.
Without CSS, you'll be able to make your first web pages. They are quite ugly, but patience ... Once you get to Part II of this tutorial, we introduce the CSS, and you'll see all of a sudden embellish your web pages (almost) effortlessly.
note: xhtml and serve to make a static web site:
A static website is a site where each page
is created in HTML. A computer that connects to
server, requests a page. The latter is directly
served (it is stored ready on the server)
In contrast, a dynamic website is a website
whose pages are generated dynamically on demand.
The content is obtained (for example) by combining
using a scripting language or
programming and database. It is often
PHP for language and MySQL database.
A question you should be sure you have asked is: "What software will I need to create my website?"
In fact, software that can create a website, there are tons.
But why pick a shareware software and complicated, then you already have everything you need in your home?
Yes, brace yourself because ... well it is Notepad!
Believe me if you want, but this software is more than sufficient to create a website!
If you have a Mac, you probably have a similar software: a text editor simple.
Well, in theory, therefore, Notepad will suffice.
But with a little research, I discovered a really useful software that helps a lot in color automatically XHTML / CSS. it's a simple free software called [URL="http://sourceforge.net/projects/notepad-plus/files/notepad%2B%2B%20releases%20binary/npp%205.6.6%20bin/npp.5.6.6.Installer.exe/download"]notepad++[/URL].
look at the image how the tags are in color and take a look at the line i selected with mouse how its each part is colorized,later it will help keep the code clean and clear to see , the part that's not colorized mean its wrong
with this i'm done with the introduction, so let's get started ,i'm gonna make separated lessons xhtml and css so i'm gonna keep going with xhtml once i'm done with it i'll move on with css:
Indeed in an XHTML page, more text, you'll find another element among these are the tags.
A tag begins with "<" and ends with ">". For example:
<tag>
The tags are invisible to the visitor, they serve as markers to indicate something to the browser. For example, a tag can specify that this text is the title of your page, another text is a quote etc etc ...
There are 2 types of tags: Some tags always appear in pairs, others are contrary to their own.
The existing pair tags: what are the most common. We wrote the first tag, you type text, then "strong" tag in the rewriting with a slash before "/". For example:
to know what it do take a look at the arrow drown in the image<title>Welcome in xpam school</title>
The first <title> tag indicates the beginning of the title, and is further closed with </title>.
The browser includes what is between <title> and </title> is the title of your website,
The tags themselves: they are kinda rare, but there nonetheless. It is used in general to insert an element in a page.
This type of tag always ends with a slash "/", but this time the slash is at the end of the tag. For example, the tag that can insert an image:
notice i made a space don't forget it, later you'll see it's a basic knowlge.<img />
Attributes:
Attributes are a means to report on a tag. You can find attribute on both types of tags (in pairs or alone).
For example, take the tag only <image />. It is fine to say that inserts an image, but does it indicate which one. We'll do that with an attribute:
Here, the attribute is "name", and it is set to "sun.jpg". This indicates that the image you want to insert called "sun.jpg" simply.<image name="sun.jpg" />
note: this attribute doesn't exist i just made it to make an example ^^
so let's make a test how to make a code ,saving it and getting your first page: with few words let's prepare a <page.html>
first copy paste this code :
then in notepad++ go to the menu select language => H =>HTML<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>welcome in my site</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
</body>
</html>
with this u'll see your code colorized,now go to Files=>Save as and type for example test.html i advise you to file a new file in c:// named site in which u will save your test pages to evoid the mess in your desktop, once it's done just go to that file and double click on it and it will give something like this:
you propably noticed there is too much words that got almost no meaning never mind it, later if you gonna upgrate to use dream weaver will be auto generated for now lets focus on the basics here an explanation of the code i gave you early :
On the first line is the declaration DOCTYPE. It is a rather particular tag, and is the only one who does not obey the rules I gave you earlier.
Specifically, this tag is used to tell the browser what you are doing is an XHTML page, and you are using version 1.0 of XHTML (yes, as in programs there are versions!).
Why am I telling you to use XHTML 1.0? Because it is one of the most recent versions, and your site will be updated
Just then the beacon <html>. This is the main tag that will encompass your entire page (x) HTML. As you can see, we do not farm with a last </ html>, which indicates that the page (x) HTML stops there. There is nothing after the </ html>.
The tag <html> contains 2 attributes:
- xmlns: this attribute is mandatory, indicates an address dealing with xHTML. Do not worry about this and leave it like that, it does not interest us particularly.
- xml:lang : This attribute is used to indicate in which language is written your web page. If you write a web page in French put "fr" as I did. If the page is in English put "us", put "it" as Italian , "es" as Spanish etc etc ...
The <head>: contains some information header for your webpage. It closed a little further.
Within the <head> you are including the <title>. It is very important: it contains the title of your web page. Here, the title is "Welcome to my site!", But you put the right title for your page
Then you can see a <meta />. There are many beacons of this type, but I'll tell you about that later because they are not indispensable. Only one I gave you is essential : it serves to indicate that you are going to type specific French (EEAE etc. ...).
Finally (phew!), After the closure of the <head> starts a new tag: <body>
Between <body> </ body> you type the content of your webpage. Clearly, it is between these 2 tags that we spend 99% of our time .
For now, there is nothing between these 2 tags, so the page displays nothing (there is a white background as you have seen earlier).
Before concluding this chapter rich in new knowledge, I would quickly tell you about the "comments".
Feedback is information that you write for you. The comments do not appear to visitors.
For example you can use comments to mark milestones if your XHTML page is very large, or to serve as a reminder.
A comment is a bit special tag starting with <! -- And ending with -->
Here is an example of comments in the code just now:
Try to save this webpage and see what it gives in your browser: there is no difference with the code just now. What's in the commentary appears nowhere.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>welcome in my site !</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<!-- Reminder: This is where you write the content of our web page -->
</body>
</html>
In general, it uses very little feedback, but I wanted to show you how it is used so you do not be surprised if you see them.
It could be that I used in some of my examples to explain the middle of the rest of XHTML.
that's it for now i hope you enjoyed your first lesson, when you read this lesson don't try to jump parts, u'll probably get lost later and you'll have to do it all over again, so be patient, get into the meaning of what said, and FEEL FREE to ask about anything i wrote it's open topic to make you learn so even if you think it's a stupid question, ask it
oki, got to go now see you tomorrow with lesson 2