20 July 2012

Part1: basics of html5 (part5)



Chapter2

Create a web page with the editor

Come on, let's get into position! As I have told you, we will create our site in a text editor. You had to install one following my advice in the first chapter: it is called Notepad + +, PSPad, jedit, vim, TextWrangler ... whatever. The software has a simple goal: to enable you to write text!

In following this course, I will work with Notepad + +. I will open (Figure below).

Opening Notepad + +

Well, what do we do now? What is written on that blank sheet?
We'll do a little test. I invite you to write what comes into your head, like me in the following figure.

Text in Notepad + +
You can write the same sentence as me or what you want, the goal is to write something.

Now, record the file. For this, it is very simple: as in all programs, you have a File menu> Save. A dialog box asks you where to save the file and under what name. Save it wherever you want. Give the file name you want, ending with. Html, for example test.html, as shown in the following figure.



I recommend you create a new folder in your documents that contain the files of your site. For myself I created a test folder where I put my test.html file.

Now open the file explorer in the folder where you saved your page. You will see the file you just created (Figure below).

The file in Explorer
The icon that represents the file depends on your default web browser. Here, the icon is that of Google Chrome my default browser, but the file may have another icon you. Here for example the icons that appear when your primary browser is Firefox or Internet Explorer (figure below).

Firefox icon file

File icon Internet Explorer

Simply double-click on this file ... and your browser will open and, as the following figure, displays the text you wrote.

The web page displayed


It does not work well, it seems! All text is displayed on the same line when we had written two different lines of text!?


Indeed, well done!
The text appears on the same line when we asked to write on two different lines. What's going on?

In fact, to create a web page it is not enough to just type the text as it has done. In addition to this text, you also write what are called tags, which will give instructions to the computer as "go to line", "display an image", etc..

0 comments:

Post a Comment