views:

254

answers:

13

Hello

It seems the most common aproach to web design is to use HTML/XHTML & CSS in conjunction with other technologies or languages like Javascript or PHP.

On a theoretical level, I'm interested to know what other languages or technologies could be used to build an entire site without using a single HTML tag or CSS style for styling/positioning?

Could a website be made only using XML or PHP alone, including actual styling and positioning?

Presumably Flash sites are till embedded in HTML tags?

Thanks

A: 

One really short, simple answer... you can't :D

Flash requires an embed tag, an image requires an embed tag etc, so you'd have to use HTML in some method or another.

PHP is an embedded language, it is used to generate HTML on which the browsers renders, with XML, well technically a browser like Ie or FireFox will render it in it's own way for readability, but I would not class that as a website.

The major developments in the world of web technologies involves the development of HTML and CSS to improve them, there isn't any need for an alternative. In fact we're pushing towards a standard, what point would there be in introducing a new language to negate these standards. The whole IE saga would simply get worse.

Like the others have suggested, you could directly load an image or a flash file, but an image is useless on it's own, and a flash interface throws up loads of problems like SEO, accessibility etc, not least it's very heavy and usually completely misused. In my mind I wouldn't even class this method as a website, it just doesn't tick any of the boxes (IMO).

ILMV
I realise this with regards to Flash, but could a site not be made using PHP alone?
Pat
I've added my post, essentially PHP is an embedded language, it is uses primarily to output HTML (either via a templating language or directly) and that is what the browser uses.
ILMV
I don't understand what is meant by 'embeddable language'. Could this be explained further?Many thanks :)
Pat
Gladly, PHP is not directly related to HTML, when I code a bit of PHP, I tell it to do certain stuff depending on various conditions. I could easily write out a text file and save it to the server. More appropriately I tell it to write out some HTML so the browser can render it. Basically PHP on it's own (in this simple example) is no good for website development, but in conjunction with HTML we have everything we need to make beautiful, dynamic web pages.
ILMV
Thanks. I understand that usually PHP is used in conjunction with HTML, but would we be able to create an entire site using PHP to output content without actually using HTML mark up in that content.Does PHP enable users to style content and position it without resorting to CSS or another 'styling' method?Pat
Pat
No. PHP allows you to send "stuff" to the browser. The stuff you send needs to be something the browser understands. PHP doesn't have any layout capabilities (you just use it to generate HTML, CSS, GTK, SWF, PostScript, etc)
David Dorward
No, you can send plain http headers using PHP.
Wallacoloo
What are plain HTTP headers going to achieve?
ILMV
+1  A: 

Curl (requires a browser plugin)

Wikipedia article

A webpage looks like this:

{curl 1.7 applet}
{value
    let b:int=99
    let song:VBox={VBox}
    {while b > 0 do
        {song.add b & " bottle(s) of beer on the wall,"}
        {song.add b & " bottle(s) of beer."}
        {song.add "Take one down, pass it around,"}
        set b = b - 1
        {song.add b & " bottle(s) of beer on the wall."}
    }
    song
}

Source

Meinersbur
Interesting.Would it be possible to present a visitor on a Curl site with a 'download the Curl plugin to view this site' window using Curl alone?
Pat
As far as I know, this is not possible. Your browser will either complain that it doesn't know the `curl://` protocol or the program to open `*.dcurl` files. The curl.com website uses JavaScript to ask whether you want to download the plugin.
Meinersbur
A: 

A website is always viewed through a browser (at least always if you are human :)). Browsers understand HTML. Whatever the technology - you have to basically render HTML. Even in cases with rich technologies like flash, the flash object that is rendered by a browser plugin is embedded inside the HTML.

In theory it is possible to do it without HTML, but the question becomes how much does the product diverge from the definition of a website...

Slavo
In this instance, I would define a website as a collection of files accessable by others via a URL address.Many websites have some kind of styling to make the content more accessable or to present better. I don't think this is essential to the definition of a website however, as a collection of plain HTML webpages makes a site.When a none HTML file is opened in a web browser, do browsers write html code to present that file? An example would be opening an image file or a Flash file.How interactive the cont
Pat
+4  A: 

There are actually serveral solutions that allow you to nearly completely avoid CSS and HTML.

GWT: Google Web Toolkit

Written in Java and will allow you to build both server and client code in Java. Used to build Google Wave.

Cappuccino and Objective-J:

Objective-J is to JavaScript as Objective-C is to C. It extends JavaScript with many near features, including type-checking, classes and types. Cappuccino is like Cacoa (Mac OS X GUI toolkit). Using these two you can build incredibly rich and desktop like webapps. They run mostly on the client side and you can use whatever you want on the server. A good example is 280slides

SproutCore is similar to Cappuccino, but it uses pure JavaScript instead. Apple is using SproutCore to make me.com.

I should also mention that knowledge to HTML, CSS, JavaScript is a good skill to know, just like understanding your compiler is a good skill.

EDIT: As said above Adobe Flash can also be used.

henrikh
While the three above solutions would allow you to technically create websites/WebApps without CSS or HTML, you're essentially trading the positive aspects of the web for them. So instead of having your structure load as needed, you're essentially compiling a fat-client and running that in your browser. This leads to your business and application logic being exposed, in addition to unnecessary long load times, similar to flash. Essentially it adheres to the principles of how a client plug-in such as flash/silverlight would work, but without the plug-in.
asnyder
+2  A: 

Lets make the distinction between what is required by the web browser, and what you as a developer use to create that markup.

Remember that HTML nowadays is xml. You could use any markup language you like and convert that to HTML using XML.

eg ASP.NET uses markup such as which is converted on the server to .

As long as the content going down the wire to the browser is HTML, or generates HTML through script, you can use any approach you like.

However these approaches have mostly failed as developers prefer having direct control over the markup. It makes css as well as scripting much easier when you are certain what the html is going to be.

ASP.NET MVC is a product created in response to criticisms leveled at the ASP.NET webforms model.

James Westgate
+3  A: 

You can make a website with out a single html tag. Just give folder read access to all your directories, have sensible file names. From here you user will be able to browse images , read text files, download videos and depending on the content he may or may not come back ever again, but you do achieve the goal of setting up a "website" with out a single line of html or css or any other code for that matter.

:-) :-) :-)

Ravi Vyas
I disagree, because what is apache (just for example) doing, it's rendering the file structure as a HTML file!? This doesn't answer his question as he states it would require `actual styling and positioning`...
ILMV
:) hey I was just putting some humor out there :P . Like you even I believe this cant be done.
Ravi Vyas
Well, even without styling and positioning I think this would still meet my personal definition of a website. :)I guess if a series of images were directly linked to a set of URLs, someone could 'design' the site in an image editor. The problem would be that without HTML links, users would have to know what the URL of each other 'page' was before hand...Thanks for the answer. :)
Pat
+3  A: 

You can host a telnet server with anonymous access and a specialized shell that restricts the user to doing whatever it is you want the site to do. ;)

MiffTheFox
So in this setup we might be talking about a bespoke IT solution for an organisation that requires concurrent multiple user access from multiple locations?
Pat
It makes me think of the Star Wars telnet version ! http://www.blinkenlights.nl/thereg/
Boris Guéry
+2  A: 

Also, this is another answer because it's a completely different technology, but you can write an application in XUL and it'll run in Mozilla-based browsers without any HTML.

MiffTheFox
+1  A: 

Since browsers view HTML, I'm assuming you mean create a site without ever having to edit/write HTML/CSS. The framework/app environment/whatever taking care of everything for you - yet still allowing you control over the presentation layer.

Seems like that is certainly possible on a theoretical level.

I ran across Noloh (not one line of html) a while back. Was intrigued, but never actually tried it out.

From various places on the Noloh site:

Because NOLOH does not rely on HTML or pages, maintaining complex rich Internet applications is significantly easier than with other methods.

Developing applications with NOLOH only requires using a single, unified language: a superset of PHP that completely maintains all aspects of server-client communication for you!

Tim Lytle
How would utilising this affect SEO?
Pat
@Pat, you're essentially trusting the framework to create markup with good SEO qualities. Of course Noloh claims to do that well on their features page (http://www.noloh.com/#/features/) Again, it's the same as a 'normal' site - but using something like Noloh hides the actual presentation format from the developer.
Tim Lytle
It doesn't affect SEO. NOLOH renders different versions of the website/WebApp specifically for the target user. It will even create the semantic relationships and links necessary to get to otherwise forgotten content. See: http://dev.noloh.com/#/articles/Search-Engine-Friendly/
asnyder
+2  A: 

There's also XML. You can create websites with XML only. A well known one is World Of Warcraft. Check the page source. An XSL is used as stylesheet. There exist even XML based web frameworks like OpenLaszlo. You can let it serve either DHTML or Flash on reqeust out of a single XML template.

BalusC
A: 

I think you could build a site entirely in SVG.

The front page of emacsformacosx is almost entirely SVG, for example.

Downsides: It wouldn't be viewable in IE (at least through version 8). And last I looked, text support, like flowing and justification, was weaker in SVG. (You could embed HTML inside an SVG element when you needed sophisticated text features, but that would violate your no-HTML rule.)

You'd probably still want to use CSS with SVG, because it's a good idea there for the same reason it's a good idea with HTML, but it wouldn't be necessary.

Ken
A: 

I think you can have an URL pointing directly at a hosted Flash (SWF) file, I've certainly done this though I don't know if all browsers work. Anyhow, I tested this when developing MyDinos.

e.g: http://mydinos.com/home.swf

John
+1  A: 

The Wt C++ Web Toolkit.

You can write your web application in C++ using Qt-style widgets (input boxes, buttons, tabs etc) and hook up client-side events to C++ code on your server. All without writing any HTML or CSS.

A sample application from their website (you may also want to look at this excellent tutorial):

HelloApplication::HelloApplication(const WEnvironment& env)
  : WApplication(env)
{
  setTitle("Hello world");                               // application title

  root()->addWidget(new WText("Your name, please ? "));  // show some text
  nameEdit_ = new WLineEdit(root());                     // allow text input
  nameEdit_->setFocus();                                 // give focus

  WPushButton *b = new WPushButton("Greet me.", root()); // create a button
  b->setMargin(5, Left);                                 // add 5 pixels margin

  root()->addWidget(new WBreak());                       // insert a line break

  greeting_ = new WText(root());                         // empty text

  /* when the button is clicked, call the 'greet' method */
  b->clicked().connect(this, &HelloApplication::greet);
}

void HelloApplication::greet()
{
  /* set the empty text object greeting_ to greet the name entered */
  greeting_->setText("Hello there, " + nameEdit_->text());
}
rjh