How do I create a website using HTML? - html

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:
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?
How do I upload this file to the Internet, do I have to upload it onto a server? If yes, which?
If there are multiple pages then how do I create references between?
Most importantly if I have to create this site should I use HTML, or something else?

When developing a website you will want to observe the following:
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
You will have to get a web host...again there are many. They will give you instructions to upload using FTP or otherwise
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.
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.

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.

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

I think you are asking about how to publish your site on the web and then access it.
Buy a domain, go to any domain hosting site like godaddy.com etc.
After buying domain the domain hosting company will send you the details of your account/pwd
With you account pwd you can access their ftp server.
Put your current html pages on their ftp server (put them in the public folder)
Access your html pages on the web now.
Also note it will take atleast a few minutes before your domain info gets published on the dns servers, i.e to say it will take a while before you can access your website (usually a few minutes)

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 Page 1
You can learn more about relative urls from here
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.
You need HTML to create webpages. There's no other option.
Hope this helps.

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.

Related

How to host my own website with my own html documents

I know this is the most basic of questions. I made my own website in HTML documents. I bought a domain name from google. How can I publish this, how can I host it? I don't want to use any website creator, I want to publish my own files that I worked on.
You can use Github to host your website on your own domain.
You have to add the whole files needed for the website. Then in the settings of your repo use the Github pages feature and enable it. Change the source of Github pages to host in your own domain. Then you have to add some A and CNAME records of your domain to point to github servers.
Here are the full steps for the process - https://www.geeksforgeeks.org/publish-websites-on-github-pages-with-a-custom-domain/

How can I access the URLs of the all the HTML files I have uploaded to my website on 000webhost

Summary:
I am a beginner to HTML and need to work out the URLs (or how to make them) of files I have added to 000webhost. I have been given the URL of my index file, and can access it easily, but the links I have placed in it do not work, as I cannot find/don't have the URL of the links (though I do have the code). Is there a way of finding/making a URL for each of the files I have added to my 000webhost project?
So I'm a beginner to HTML and after making a basic website (including links to other pages I have created)I have decided to try and upload it to the internet. I watched a couple YouTube videos on how I should do so and ended up using htmlsave.net . I copy and pasted my code in, changing all my links from places om my desktop to the URLs provided by the website, and everything worked. However, since I had not paid money for a membership I quickly reached my limit on how many pages I could reach. Because of this, I decided to use another(free) web host that would not limit me on how many web pages I could add to a website.
After some research I settled on 000webhost. Everything started off smoothly, I created the project, added my files and got my index file up and running. However, from my index page (which I could now access on the internet), I could not use the links inside it, as they were still still linked to locations on my computer.
Therefore, I opened the code to edit it, but then quickly realized I did not know the new URL of all the files(excluding the index file (named index.html) which 000webhost had provided me as stated earlier) I had added to my 000webhost project.
So after looking around on google and stack overflow I have not been able to find a solution on how to find out the new URL given to the files I have added to 000webhost.
(Apologies for any incorrect use of terminology, as stated I am extremely new to HTML)

Google Sites HTML export keeps redirecting to live site

I was trying to export a Google Site I made for a project. I used wget to spider through every page and to download the html files and linked content. When I try to open "index.html" in Chrome, it does open the local HTML file, but it redirects me to the live version immediately after.
Is there anyway I could modify the HTML code so that it won't head straight to the actual website? I just want to have a local copy of it for reference, and I don't want to store it on Drive.
As the HTML file is too big to type out, I have provided it on Pastebin here.
.
You need a better question. No website works offline, or they do if you download all the files to your user’s computer so the user can view it offline. But at some point they had to visit it online to get it.
Or you save it as an html site and hand it to them on a USB drive. That’s offline to that extent. But then it’s not really a website, its an html file.
Or otherwise, if you need a website for your school which can be used by anyone through internet / intranet, you have two options -
1. Create and host a website in an online server
. a. You have to buy space and deploy a server yourself.
. b. They will a run website in their webserver for you. You just need to give money
2. Deploy a webserver in the school's any one machine and get it in other machines.
Rephrase the question for a better answer.

How to publish a html page (generated with Rmarkdown)?

I use rmarkdown to create html pages. I would like to know how to publish, simply and efficiently, html pages.
Solutions that I know exist:
Web hosting: you can purchase a specific domain and host you your files. I have built some wordpress sites with this, but I don't know basics about web security, it is necessary to have a ftp transfer software.
With google drive, you can host html pages. It is quite simple, you can find the id the the shared document, and enter: googledrive.com/host/DocumentID. But you can not customise the domain name, and this url is redirected to a very complicated name.
It seems that github offers a lot of possilities. I think that some of you have already had the same problem and found the solution. So could you please share ? Thank you
you can host your html easily just check out this or this

Serving local file:/// links and AppCache

I'm making a webapp for members of my caving club to search through and view cave survey note PDFs. It works fine, and I got the AppCache working for the web version of it.
However, since the PDFs are quite large and slow to download, and many members have the PDFs on their local machines from the same SVN the website gets them from, it would be ideal for them to be able to use a page with links to a local SVN folder of their choosing.
The design goals:
The site displays links to PDF files on the local filesystem
Whenever I add features to the site, users get them automatically the next time they open the page and they're connected to the internet
But after the first time they open the page, the site works offline.
Sadly web browsers don't appear to support this useful combination of design goals at once.
I can satisfy #1 by having users download a copy of the site, add their local SVN path in a JS, and open their local copy in the browser, so that file:/// links work.
I can satisfy #2 by having absolute links to JS bundles on the server.
I can satisfy #3 by using the AppCache.
I thought I could get clever by having the copy of the page on the local file system have <html manifest="https://myserver.com/myapp.appcache">, but unfortunately Chrome doesn't seem to allow a local file to use an app cache manifest hosted on a server, for seemingly no good reason to me.
Does anyone know of another way I could satisfy all 3 goals?
Perhaps there's some simple program/config I could give my friends that would intercept web requests to https://myserver.com/some/folder and instead serve them out of a folder on their local file system?
Andy,
I know this post is a bit old but came across it looking for something else related to AppCache. My understanding it that the html page and the manifest must reside in the same domain for it to work. So I think you need to modify your design:
Create a JavaScript function that acts as a setting for the user to enter the path to their local copy of the PDF's. Store this information in localstorage.
Create a html template page for the document links.
Create a JavaScript function that populates the html template page with any documents and links the user enters.
This way, the users visit your application online and it uses appcache to store itself and the JS files for offline use. To access the PDF's, the user clicks a settings button that launches a page to collect path information and saves the information in localstorage. The users can then access the template page which will populate with the documents they entered.
Here is a good intro to localstorage: [http://www.smashingmagazine.com/2010/10/local-storage-and-how-to-use-it/]