Is HTML code?

Can HTML be described as code?

  • Yes it is code

    Votes: 57 43.8%
  • No it isn't

    Votes: 54 41.5%
  • Who cares/ does it matter?

    Votes: 19 14.6%

  • Total voters
    130

Wiseguy2001

2[H]4U
Joined
Nov 28, 2001
Messages
3,470
Here you guys have a blast.

And if it is or isnt what about PHP, ASP and Coldfusion?

Where is the line between programming languages and markup languages?

While were at it, what about SQL?
 
As inspired by a discussion in another thread?
Anyway. :)
Code? Yes. It's a set of instructions that are parsed to do things with data.
But is a HTML page a program? I'd say no. There's just too much lacking. It doesn't "run", so there's no state, for one thing.

PHP? Definitely a programming language. [1]
ASP? Much the same.

SQL is the most interesting one. You can't write generic programs in it [2], but it's neither data nor markup. A bit like regular expressions, really. It's code, for some meanings of the word, but ...


[1] In addition to all the web systems written in it, it's usable for shell scripting. M0n0wall uses it for all it's boot scripts.
[2] Let's ignore PL/SQL and the like for a moment.
 
The argument against code (and probably the correct one) is that you're not capable of making decisions or generating any new information in HTML or other markup languages.

The argument for HTML as code is that you're interleaving human-interacted information with computer-interacted information.

Ultimately, it's an issue of semantics; namely, the answer is determined by where you separate "code" from "program". Alternately, the non-savvy would likely replace "code" with "confusing," in which case an entirely different answer is reached. Anybody who actually knocks himself out over this probably needs some Valium.

As for PHP / ASP / etc, they're code. They meet the conditions above. SQL likewise is code, though it's got a far narrower scope than the others.

Why is making decisions the key? Because one decision operator, with nothing else, is enough to create a Turing-complete computer.
 
HHunt said:
As inspired by a discussion in another thread?
How did you guess :D

I totally forgot to mention DHTML (html, css and javascript). now since there is no limit what can be done with the website, is this 'just' a markup language or is it something more?
 
Wiseguy2001 said:
How did you guess :D

I totally forgot to mention DHTML (html, css and javascript). now since there is no limit what can be done with the website, is this 'just' a markup language or is it something more?

I'd say HTML and CSS are a framework for programming languages (VBscript and JScript/JavaScript/ECMAScript), kind of like the GUI specifications files QT use. Not a programming language in itself, but important tools for one.
 
HHunt said:
I'd say HTML and CSS are a framework for programming languages (VBscript and JScript/JavaScript/ECMAScript), kind of like the GUI specifications files QT use. Not a programming language in itself, but important tools for one.

But you don't need VBscript, or Jscript to have a page function, it may not look good, but it in itself is very much code. It's a set of instructions, with variable and the like. It's very basic, but code non the less.
 
Is HTML code? No, HTML is properly described by its title, HTML is a markup language. It makes text look pretty, and allows other objects to be inserted into the flow of the text.

HTML lacks control structures that seem to be what defines code anymore, whereas the scripting/web lanugages you reference earlier have the ability to do them.

So, that's my vote : )
 
Code is a set of instructions that a computer/parser can follow. This makes HTML code. I agree with the first post, it's code, but not a program. It lacks any of the concepts of being turing complete, so it's not a programming language surely.

But, who cares?
 
HTML is very clearly code in that it encodes something. I think what you wanted to ask is whether or not "coding" HTML makes you a programmer, and the answer there is an emphatic no. As already touched on in this thread (I've only skimmed it), the major difference between markup and programming is that markup doesn't allow you to make decisions.

There are plenty of technologies that blur the line: XSLT, JSP, and what have you. But in my experience, people who are capable of grasping these sorts of things are already capable of programming to some extent, so I don't have any problem considering them to actually be programming.
 
Ooh, neat.
I've seen a turing machine implemented with the C preprocessor and an external loop, not sure if this is better or worse. :D
 
I don't need proof to know that C++ is a monstrosity. :D
 
Everytime I hear that the programming field is losing jobs I think of people who think html is code. =)

(That or im in denial and dont wish to seek for proof)
 
Wiseguy2001 said:
Here you guys have a blast.

And if it is or isnt what about PHP, ASP and Coldfusion?

Where is the line between programming languages and markup languages?

While were at it, what about SQL?

HTML lacks flow control methods (if..then..else, switch..case) as well as looping mechanisms, therefor it is not a programming language in my book.
 
HHunt said:
As inspired by a discussion in another thread?

Yeah it's always fun when people don't like the answer and start a poll in hopes public misconception will support their thesis.

Anyone that voted yes, look up what HTML stands for. "Markup Language" people. Not code.
 
If HTML is code then so is a Word document. I embed all sorts of formatting instructions into the text. They are even processed by a computer and sent to outside sources like printers to be interpreted. So, anyone who can use Word must be able to write code.

The argument for HTML as code is that you're interleaving human-interacted information with computer-interacted information

This occurs any time a person uses a computer.

HTML is very clearly code in that it encodes something.

This isn't the computer science use of the word though. Traffic code is code. Morse code is code. Pig-Latin is code.

So is 1337-5p34k code?
 
From a communications science standpoint, everything that communicates information is code. From a computer science standpoint, hell no.
 
I would consider xhtml more like code than html.. although I don't really consider either code. xhtml at least has user definable types, but there is still no logic in css/html/xhtml. (I do consider javascript code)

I think when you start getting into logic (if/while statements), you are getting into code. All server side languages that I know of have this.

I also think sql is code, although it doesn't create some sort of executable. Doing select * from somePlace where item like '%includes this%' is basically an if statement. You can even do select 2*2 and it will give you 4.
 
Empyrean said:
This isn't the computer science use of the word though. Traffic code is code. Morse code is code. Pig-Latin is code.

So is 1337-5p34k code?
Yes. This was exactly my point. I'm sorry if it wasn't clear; I'm not sure how much more plainly I could have phrased the distinction. Unfortunately, you can't just dismiss the vernacular, or you'll end up confusing people.


HorsePunchKid said:
I think what you wanted to ask is whether or not "coding" HTML makes you a programmer, and the answer there is an emphatic no.
 
devourment77 said:
I also think sql is code, although it doesn't create some sort of executable. Doing select * from somePlace where item like '%includes this%' is basically an if statement.
I think whether or not you consider SQL to be code depends heavily on how you use it. There are many people out there who will never go beyond SELECT * FROM Employees. At that level, I would consider SQL just a simple grammar for asking questions.

Obviously SQL (and various implementation-specific procedural extensions to it) go way beyond that and can definitely be used to program. I'd guess that only a tiny fraction of people who use SQL ever get into that kind of thing, though.

As an analogy, PHP can clearly be used to implement very complicated programs. However, plenty of people won't ever get much beyond using it to include a header and a footer. I wouldn't necessarily call them "programmers".
 
It's rather obviously code.

It's also quite different (ie much more limited) compared to Java, C, Cobol, whatever you like which are programming languages.

Really this seems like a silly question to me, but that's my opinion on many topics. ;)
 
Perhaps one should use 'language' instead of 'code':

C/PHP/Javascript are languages. HTML is a language. However, the question is what type of language it is. The former are commonly defined as programming languages, whereas the latter even refers to itself as a markup language.

One of the webdesign projects I'm currently working on involves writing a CMS from scratch using HTML, CSS, PHP and SQL. What does the HTML do? Together with CSS it determines the layout (markup) of the displayed document. The most interactive elements are those embedded in a form, and those simply call PHP scripts.

So could one write an application in HTML? Not a chance. HTML is more akin to a PDF file, except that it's rendered differently in another browser :p the comparison with a bitmap is quite fitting as well.

In applications using DHTML, it's also quite clearly the Javascript part which does the actual work, with HTML and CSS merely determining what the user sees.
 
Being able to use a program that hides all of the code in the background for you, and being able to actually work with the code it generates are 2 different things. Just because Word abstracts all of the details of the code from you doesn't mean it's not code. If you WANTED to you could learn all of word formatting stuff and write word documents in notepad. Of course we all know that's retarded, as word does a fine job.

Similar thing occurs with frontpage, only frontpage sucks at what it does. If you write code the way I do, as well as most good web developers (good in a programming text editor (vim)) and write it AS code, not using programs like dreamweaver, frontpage, etc that abstract all of the details from you, then you'll plainly see it as code. Just because it doesn't or can't make decisions for you doesn't mean it's not code. Let's take for example a simple basic program

10 Print "hello world"
20 end

No decisions were made, the code was interpretted line by line, and output was fed to something (in this case it's a console). How is this any different from html? The only difference is it's fed to a web browser, that parses the output and arranges the data on a page in a systematic way. Basic is your interpretter in the above example, the web browser is the interpretter in the html example.

Empyrean said:
If HTML is code then so is a Word document. I embed all sorts of formatting instructions into the text. They are even processed by a computer and sent to outside sources like printers to be interpreted. So, anyone who can use Word must be able to write code.



This occurs any time a person uses a computer.



This isn't the computer science use of the word though. Traffic code is code. Morse code is code. Pig-Latin is code.

So is 1337-5p34k code?
 
Fryguy8 said:
Let's take for example a simple basic program

10 Print "hello world"
20 end

No decisions were made, the code was interpretted line by line, and output was fed to something (in this case it's a console). How is this any different from html? The only difference is it's fed to a web browser, that parses the output and arranges the data on a page in a systematic way. Basic is your interpretter in the above example, the web browser is the interpretter in the html example.

The problem with your BASIC example is that it's too trivial: it could include a decision or a computation, but doesn't. If it did, you'd be defeating your own position, so that must be why you didn't include one.

As Iomn75 pointed out almost two days ago in this thread, you're not doing computation if you're not making decisions. If you don't understand or don't believe that, get a book on computability theory.

A web server doesn't interpret HTML. It just sends the file in response to the request after adding a few header. It will only interpret the file if it knows it is composed of an interpretable scripting language. You can't use static HTML to make a decision; you have to use another language.
 
Fryguy8 said:
Just because it doesn't or can't make decisions for you doesn't mean it's not code. Let's take for example a simple basic program

10 Print "hello world"
20 end

No decisions were made, the code was interpretted line by line, and output was fed to something (in this case it's a console). How is this any different from html?.
You can't compare a 2 line example of code, to an entire language of html. Basic has the option to make decisions.
 
"The ability to speak does not make you intelligent."

Another quote, don't know what I think of it.
 
Wow this whole "is a tomato a fruit or a vegtable?" thing going on here is getting pretty heated. Isn't a markup language kind of a category itself?
 
enlightenedby42 said:
Wow this whole "is a tomato a fruit or a vegtable?" thing going on here is getting pretty heated. Isn't a markup language kind of a category itself?
I think markup languages are a category on their own, that fit in the coding category.
 
mikeblas said:
*sneeze* What are you talking about? *fart*
:confused:

This.
Strictly speaking, it's not as much a case of an image being code as much as containing it.
 
HHunt said:
This.
Strictly speaking, it's not as much a case of an image being code as much as containing it.

That class of vulnerability can allow any piece of data contain executable code. Is your contention that, because of such vulnerabilities, that network packets are code (in the "program" sense of the word)?
 
IMO it is code but not programming. Code is something you put together to make the computer do something. HTML falls into this category as HTML tells the computer what to put on the screen. Programming is about making decisions and acting upon those decisions - something HTML can't do.
 
mikeblas said:
That class of vulnerability can allow any piece of data contain executable code. Is your contention that, because of such vulnerabilities, that network packets are code (in the "program" sense of the word)?

Not really. I just felt like replying to him with a case where images are (ok, "contain") code. It wasn't really adding to the discussion. :)
 
this is rather off topic... but I think it's cool how closely the numbers of voters is almost exactly the same as their correlating percentages.. weird...
 
Back
Top