Is HTML a scripting language?

August 24th, 2006

I’ve seen this confusion come up from time to time – is HTML a scripting language?

Short answer: no.

Yes a nerd detail, but nonetheless, this is something that should be made clear.

THE DETAILS:

HTML is actually a markup language and not a scripting language.

Scripting implies decision making capabilities (the code can actually evaluate and take an action based on what it finds) – PHP, PERL, Ruby, Javascript are examples of scripting languages.

Markup languages create structure for a document … they only describe data. For example:

  • HTML
  • XHTML
  • XML

… but you knew that already.

[;)]

Stefan Mischook

9 Responses to “Is HTML a scripting language?”

  1. greg says:

    Yes, we knew it already. It is used just to create www pages.

  2. BluEnt says:

    No, HTML is not a scripting language, it is basically a hypertext markup language or a bsic language used to create web pages only. It is the code that tells the web browser how to interpret a web page.

  3. Jarrod says:

    While JavaScript is the most widely implemented scripting language, it is possible to use any language, provided the browser you are using can understand it. Microsoft, for example, also makes a scripting language for the Internet Explorer browser called VBScript (based on the Visual Basic programming language) and a few other languages (such as Perl) are also usable with some web browsers.

  4. Greg says:

    As a web designer, I’d be lying if I said you dont need to know how to edit HTML, but please, don’t waste any time learning how to write HTML from scratch – you just don’t need to know it.

  5. Edward Clarke says:

    HTML *is* a scripting language. A script doesn’t need to have decision making capabilities, it can be a set of instructions or rules. A script is interpreted or compiled, then executed. How does HTML not follow this?

    Oh, SCRIPT/NOSCRIPT and FRAME/NOFRAMES are interpreted decisions which is logic. HTML is almost object based due to the fact you can embed objects with it and include HTML via SSI.

    A script is defined by the fact it’s instructions are interpreted by an application. Sounds like HTML to me!!!

  6. @Edward Clarke,

    Interesting points. But if HTML is a scripting language, it is one of the most crippled ones out there …

    You cannot (for instance) define your own conditional (uh ..) conditions … you are restricted to a very limited few predefined options.

    With a true scripting language, you can define a condition, evaluate it and then take an action based on the result. This you cannot do with HTML.

    In a nutshell: there are no if statements, no loops, no variables – these are all basic constructs of a language.

    But you say that is not a requirement of a scripting language ..?

    I don’t know who the authority on this is, but somehow I doubt it.

    Sure there is some cross-over between a markup language and scripting … but there is cross over between a lot of things.

  7. Robert says:

    Would style-conditionals count as decision making? Are those done with HTML or something else? Looks like HTML to me.

    To Greg:
    A designer is not a person who should just be slapping things into their HTML editor with DW or Front-page (gah!). If you tend to work in design view you’re more than likely producing sloppy html (paragraphs for line breaks, emtpy divs with no reason). For this reason alone I think any competent designer should be able to write clear concise code by hand.

    Non-validated/convoluted code only hurts you.

  8. VeNoM says:

    yes even i have seen many people making a mistake in this. they dnt understand that html is a markup language. and that it is not something which goes and processes into the server.
    scripting laguages are like asp, asp.net,php. and i think now a days asp.net rocks. it has a very wide scope because now it has eliminated the funda of hosting server. yes now i dnt have to thnking of windows hosting or linux hosting as it will run on both the servers.

  9. shital jethva says:

    HTML is the “mother tongue” of your browser.
    HTML is an abbreviation of “HyperText Mark-up Language” – which is already more than you need to know at this stage. However, for the sake of good order, let us explain in greater detail.

    Hyper is the opposite of linear. In the good old days – when a mouse was something the cat chased – computer programs ran linearly: when the program had executed one action it went to the next line and after that, the next line and so on. But HTML is different – you can go wherever you want and whenever you want. For example, it is not necessary to visit MSN.com before you visit HTML.net.
    Text is self-explanatory.
    Mark-up is what you do with the text. You are marking up the text the same way you do in a text editing program with headings, bullets and bold text and so on.
    Language is what HTML is. It uses many English words.

Created By Stefan Mischook  |  Site Map  |  Top of page  go to top of page