Are all web pages HTML? - html

I see all these tools for web page creation. (Java, PHP , ASP.NET , CSS, WordPress...) When I save a web page, it's always HTML. Does that mean that all these tools are platforms for creating HTML web pages? Or are they alternatives to HTML altogether?
Also, if they are all HTML, why do web hosts advertise they have Linux / Windows? What does it matter?

HTML is a markup language which your browser (Firefox, Chrome, Internet Explorer, etc.) can read to render what people usually call a webpage. However, your browser can also render image files (try opening a photo with it), XML files and many other file formats.
When you try to access a URL (let's say http://www.stackoverflow.com), your computer sends a request to the server which hosts the site. Any technology can be running on the server (Java, PHP, etc.) to process your request. The server is a physical machine which can be running any OS (Windows, Linux, etc.) and software. Eventually, the server returns a response to your browser (oftentimes the response will contain an HTML page for the browser to display).
Wordpress which you mentioned is a content management system which helps people making PHP websites.
CSS is a markup language which is used to decorate HTML pages. Most HTML pages refer to a CSS stylesheet which your browser retrieves and then interprets.

For a web page, HTML is always the "end product" sent to the browser (in addition to any images, stylesheets, script files, etc which the HTML links to).
Java, PHP, ASP.Net are server-side languages you can use to generate HTML dynamically on the server (in comparison to just serving static HTML files)
CSS is styling for your HTML. You either write it in the HTML page itself, or in a separate CSS file which you then link to from the HTML.
WordPress is a complete CMS (Content Management System) built on PHP and MySQL.

They use HTML just for the basic layout. You can do Websites which don't use any HTML. The OS of the server is just a usage/performance question for the hoster. Also I think there proprietary Windows-standards that Linux servers can't handle, but I'm not sure on that one.

Basically, the client-side output is HTML in the most cases although it cannot be only that, but that is the standard. The PHP, ASP, etc. are running server-side and you cannot see them. Only exception is JavaScript, which runs clientside so you can see it if you're viewing the source, but finally, the page output will be HTML.
Note: CSS is a formatting system. WordPress is a blogsystem (or now a CMS) written in PHP. So you're mixing some basic points.

you mentioned two different thing:
First HTML:
this is basic language for showing data on web. All pages are sent as HTML page and your browser renders HTML and shows you images and links and ...
The other thing is web programing languages like php,asp,java... . they are languages that process data like verifying user name and password and send its result as HTML to user.
the other thing you've mentioned about hosting:
every programing languagehas its own requirements for example if you want to write a program in ASP.NET, so you have to use windows server.
so it depents on your need to choose one.

Related

Anyone know the script to this HTML mobile grid homepage?

Mostly the image shows it all. But I would like to know if anyone has the script to this code, or something similar to it where I could easily change it to look like this.
Thanks.
( view image at; https://ibb.co/cnHqgb (can’t upload one to here))
All you have to do is use the Developer console on your web browser, if you are referring to javascript; Javascript is a client side scripting technology which means it is run on the clients computer. All resources for the web page rendering are available on the "client computer". Visit here for information on what client side means: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwjqhfWyubLYAhUQ4mMKHfOaAbEQFggpMAE&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FClient-side&usg=AOvVaw2_tROJ3t6y_go_JvYx5Cbc
PHP on the other hand is also a scripting technology but is run on the server, but PHP only serves what scripting your browser recognizes which is html, javascript, java, flash etc...
Open the developers console and look under the resources tab and you should have a listing of all the resources for the page under question. You can then download them and look at the source code that is used for browser rendering. You must keep in mind that sites are intellectual property and usually contain copyright footers which means while you can research and learn different design layouts for websites by inspecting source code, if you steal a site owners exact intellectual property for displaying a website you could be held legally responsible.

Finding out how a website is coded

I'm trying to figure out how to program a website that looks very similar to http://www.renthop.com/.
I'm new to web coding, so I'm not really sure where to start. For example, is it Java or HTML? Or both? I really like how its setup, the responsiveness and smoothness of it. I just want to make sure I start off in the right direction in terms of choosing the right language etc.
If anyone has any idea of what this is based on it would be greatly appreciated!
Thanks - KC
The server-side code is PHP, the front-end is built off of the jQuery and jQuery-UI javascript libraries and a series of third-party plugins. The final product is a dynamic HTML application.
Do you want to launch your website? If so, creating a website from HTML would only make a website on your local hard drive, not public. You're going to need a domain name and hosting to make it public.
HTML is a markup language for formatting websites, but you can still create a website out of it. Not public, as I said above.
CSS is rulesets for telling the browser how to display the HTML formatted content. It is also not a programming language in the same way HTML is, although it can be a lot more powerful.
Javascript is a programming language. You use it to make the website interactive. Get Firebug or a similar add-on for Firefox, or just right click and 'Inspect Element' in Chrome to see the javascript for more detail on what javascript does.
AJAX is an extension of javascript to get data from the web server and update the page with it, without having to refresh the page.
PHP is code commonly used server side to interact with the filesystem and databases and output HTML. You can also use python, perl, .NET and a handful of other languages/frameworks to do this.
MySQL is a database.

How do I create some HTML help pages, with the same content at the top and bottom, without php or ASP etc?

I want to create some html help pages, separate html pages.
However, I want to have the same content on the top and bottom of the pages.
In the past I've used PHP or ASP, with header and footer files.
I've then had to do view source and save these pages to get what I want.
I just wondered if there an easiest way to do this ?
EDIT:
The pages are for use with software using a web object not a normal browser. So there won't be a web server
If your web server supports it, you could do server side includes
You could use frames, but it's not necessarily advisable (for one, it breaks navigation).
You could use XML files with an XSLT stylesheet to turn them into HTML documents that share similar elements.
You could use PHP or another server-side language to generate the pages, and then use a recursive download tool (such as wget) to turn them into HTML.
EDIT: you're basically asking whether the "standard-ish" subset of HTML supported by your component of choice provides a way of including data from a common file, just so you won't have to include the data in every HTML document.
The answer hovers somewhere between "no way" and "maybe your component has a few tricks to do that".
The sane thing to do here would be to have a tool generate the HTML documents from a common template. Could be XML + XSLT, PHP/ASP/whatever, or a fully-fledged CMS (this actually helps let non-technical users write the document contents).
It's awful, but you could include a JS file that uses a bunch of document.write("...") to include common elements. Not SEO friendly.

including other pages in HTML documents

Let say you are working on a website template that has many pages (index.html, blog.html, contact.html...). You start by designing the home page and then move on to other pages. While you are on other pages, you think of some improvements and these improvements must affect the whole website.
So I return to each page and make the change. This is quite unproductive especially when you have 6 or more pages and sometimes you forget to update the change.
If it were PHP, I would do
require ('header.php');
This worked for me well. But right now, I'm working on HTML and don't really like to transform to PHP and then again to HTML.
So do you have a specific method/way of doing this?
You can use server-side includes to get the effect you want, if your server supports them.
You can use PHP to include a number of smaller HTML files. The PHP script is minimal. No "transform" is required. Just something like require('header.html'); require('body.html'); require('footer.html'); or some such.
If what you're worried about is having to write a lot of PHP, you can use a templating engine such as Smarty TPL to clearly separate the code from the pages and minimize the amount of coding you have to do. This has the added advantage of having HTML "generators" that will automatically do things like producing radio buttons for you or obfuscating email addresses.
You can use CSS to centralize styles for your page so you can make site-wide appearance, layout, and design changes by modifying the stylesheet.
If you're working with HTML pages, (e.g. including extensions .htm and .html), consider using Server Side Includes. This approach works with basic HTML parsing, and is supported by most/all major web servers, including Apache and IIS.
Simply include this text in your .html file:
<!--#include virtual="header.html" -->
The web server will then fetch the markup in that file, and will insert it inline in the page it's currently serving.
You could use PHP as a pre-processor, a code generator. Run the PHP on your local computer, then save the static HTML pages it produces and post them to production. You could write a little script to visit each of your PHP pages and save the corresponding HTML. Then you could have the convenience of PHP at design time and the simplicity of HTML in production.

Best way to use the same HTML on static web-pages

If you use dynamic pages like JSP or asp.net, you can have your page template included, and then content added. But what if you have no server-side component and all pages are just HTML/JS? You can of course create a template then copy it for each page, but then if you want to change something you risk having to modify every page, even if you put most styling in CSS properly.
Are there any non-awful ways to do this? I could see that an iframe could be used to load the content into the central page but that sounds nasty. Does HTML provide any way to include a base file and add to it?
You can use Server Side Includes to include other files on the server. It's similar to scripting languages like ASP or php, but SSI is usually supported by the server directly, so it's available on many servers, even if there is scripting language available.
The answer is still templates. Just process them offline instead of on the server. I like to use ttree for this.
You can create the pages offline and render into HTML, and deploy those to the site.
One option might be: https://github.com/thewml but it does feel ... "too much". I also saw asciidoc for creating sites ( https://asciidoc.org/ ) and I also used several times doxygen for that ( http://www.doxygen.nl/ ).
I also saw CMS that create static HTML files, but hey are no longer maintained.