tags:

views:

198

answers:

7

I have recently learned how to write HTML pages on a standalone computer, with all the references given to the directories in the local drives.

How, then, can I do the following:

  1. Create a website, using HTML. I know I'll be able to create its look, but I don't know what should be given as the reference address (URL) if there is a hyper link (like: href). So how do I get an address that can be used on the Internet?

  2. How do I upload this file to the Internet, do I have to upload it onto a server? If yes, which?

  3. If there are multiple pages then how do I create references between?

  4. Most importantly if I have to create this site should I use HTML, or something else?

+6  A: 

When developing a website you will want to observe the following:

  1. You need to regsiter a domain name that you want people to use to access your site. You can do this using any number of online registrars

  2. You will have to get a web host...again there are many. They will give you instructions to upload using FTP or otherwise

  3. The references between pages on your website will have to use relative addresses. That is /page2.html rather than http://www.myserver.com/page2.html.

  4. You have to use HTML to create the front end. Plus CSS and maybe JavaScript. If you need dynamic content like accessing a database etc then you have to learn server side languages like PHP, ASP.NET or JSP.

Vincent Ramdhanie
thanks for this one now it is a bit clear..can you me the exact difference between html and javascript and css php...what are they used for respectively...my ideas aren't clear!!
Shreyas
I like how you talk about relative addresses, but your example is an absolute one :P
Jani Hartikainen
@Jani: Isn't it still a relative URI because it lacks the base URI of the host?
Chuck
@Jani I think that absolute addresses must start with the absolute server name or root of the drive etc. Relative addresses on the other hand are given in terms of the location of the current page. So page.html refers to a page that is in the same directory as the current page, and ../page.html is one directory up etc.
Vincent Ramdhanie
@Shreyas HTML is used to specify the content of a page...text, images, video and so on. CSS is used to specify the look and layout of the content, so font, alignment, colours etc. JavaScript is used to create dynamic elements like drop down menus, pop ups etc.
Vincent Ramdhanie
vincent sir can i please get your email id.?
Shreyas
@Vincent and your example begins with a /, making it an absolute path to the server http root.@Chuck absolute URLs begin with a / similar to *nix absolute paths
Jani Hartikainen
A: 

You'd want to look into information about the MVC principle of webpage design:

http://en.wikipedia.org/wiki/Model-view-controller

Wiki has a pretty good explanation, but in short, the model is the code behind each page, the views are the HTML, and controller is the brains of the whole operation (handles server requests, user input, routing, etc). Sinatra is a good starting framework for making a website in Ruby. I'm not able to answer your question about hosting unfortunately; depending on what you're making, you could host it with Heroku, or maybe something like GoDaddy.com would be better for your needs. You'd also want to research HTTP verbs:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

Good luck!

maksim
-1 He's just asking about a simple HTML website. I think MVC is way overkill.
Jon B
A: 

Hi Shreyas,

  1. Try giving relative urls in the href link. For e.g. if you want to link index.html to page1.html in the same folder you don't need to give complete path of the page1.html for the link. You can simply write <a href="page1.html">Page 1</a> You can learn more about relative urls from here

  2. You can get a free web hosting account from sites like http://110mb.com , they also provide a free sub-domain and a ftp account.

  3. You need HTML to create webpages. There's no other option.

Hope this helps.

Gaurav
+3  A: 

This is a great site if you're just getting started with HTML: http://www.w3schools.com/

Jon B
+2  A: 
Rajat
I -and this a purely personal opinion- dispute your use of the phrase 'good domain hosting site' to describe godaddy.com. See: http://www.google.com/search?q=godaddy+complaints for a list of reasons not to use them.
David Thomas
+4  A: 

To reference pages and resources (images, css, et.c.) you can use either relative paths, virtual paths or absolute paths.

A relative path shows the relation between the items, for example:

An image in the same folder: art.gif
An image in a subfolder: images/art.gif
An image in a parent folder: ../art.gif
An image in a parallel subfolder: ../images/art.gif

A virtual path starts with "/", so it's relative to the root folder of the site:

An image in the root folder: /art.gif
An image in a subfolder: /images/art.gif

An absolute path specifies the complete URL to the resource:

An image in a subfolder: http://www.mysite.com/images/art.gif

To put the pages on the net, you need some kind of hosting. You can start with searching the web for "free hosting" and you will find plenty of sites where you can try this out.

Most free hosting offer a subdomain or subfolder for your site, like mypage.thewebhost.com or www.thewebhost.com/mypage. If you want your own domain like www.mypage.com you need to register it for a fee. Many hosts offer a domain name "for free" when you buy web space, but you will of course end up paying for it in the end as it's included in the fee for the space.

Regardless of how you create the page, it will use HTML in the end. That's what the web is made of. If you use a server side language like ASP.NET or PHP, they still output HTML pages for the browser.

Guffa
A: 

Google is your friend. There's tons of help for web site development. I just recently switiched from HTML to PHP, but I recommend you use HTML until you are fully comfortable with it.

Nate Shoffner