How to create and read a HTML file?

easy tutorial to create or read an html file


Hey, welcome to this new tutorial!!

dr duck to teach how to create html file!


Before starting, if you have any question, don’t hesitate to post a comment!
I will happily help you. There are no silly questions!

If you followed “How to create a website from scratch?” tutorials, you should already have installed Wampserver with a new project. If not, go and read it now!

So please open the folder of your Wampserver project…
Or any folder.
In this folder, right click and create a new text file

create a new HTML file


Name it whatever you want (letters, numbers, -, _, space only ) and replace .txt with .html.
If prompted, confirm that you want to change this extension.

And congratulation!
You just created your first HTML file… ok empty, but it is a first step!

html web page code


I guess you want to write something in it.
Now open it in your favorite text editor

Any text editor can do the job, I use Notepad++, it is free, powerful and very easy to use!

Write some rows:

Save it.

To read a HTML file, you don’t need to go further.
You just need to ask any browser to open it, the browser will read the file and will display what it reads.

The only difference will be how you want to open this file.
You have 2 choices here:
– Either your browser reads the file directly, from your hard disc.
– Either you ask the web server to send the file to your browser with an web address. (like on the internet)

The first choice is very easy… a bit too easy for us!
Double click on the icon (if it is an icon of a browser), or Right click > Open with > Choose your favorite browser to open it.

html web page code


EZPZ!

OR!
Choose this way… warrior advice!
You will open your file in a real website!
Open your localhost click on your project!
(Go How to create a project on Wampserver if you are lost, or just ask!)

how to open an html file


You should arrive on this page!

code html ready


And now click on the link.

AND BOOOOOOOOOOOOOOM!!
You just created your first web page!!

first html page


Ok, now change the name of your file by index.html and just reload the page!
AND BOOOOOOOOOOOOOOOOM AGAIIIIIN!!
first index page


Actually, your web page start automatically.

Apache is set up to start index page in first… so it is because you called your page index than your website start automatically.
Apache recognize the name of the file and it sends to the client this first file.

I hope your enjoy the tutorial,
I have to fall in love.
Kiss, love!
first index page

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.