views:

167

answers:

7

Is this:

<h1 id="superheader">Morbi in sem quis</h1>
<ul class="highlight">
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
<li>Aliquam tincidunt mauris eu risus.</li>
<li class="important">Vestibulum auctor dapibus neque.</li>
</ul>
<p id="fancy"><a href="#" onclick="javascript:theFunc();">Vestibulum tortor quam</a>. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Feugiat vitae, ultricies eget, tempor sit amet, ante. </p>

<script type="text/javascript">
//  do some things
alert("hi!");
</script>

"code" or "markup", or even something else entirely, and why?

The context is that we are writing instructions for users who range from slightly to very technical, and need to agree on a term for the template document.

+5  A: 

You have both.

The line alert("hi!"); in script tags and the onclick handler javascript:theFunc(); is program code. The rest is standard HTML markup.

Mark Byers
+10  A: 

All of the HTML tags are "markup", although the JavaScript that they contain is "code".

Justin Ethier
+3  A: 

That's both. HTML is a markup language. JavaScript is a programming language, so those portions of your document are code.

Bill the Lizard
A: 

I think it is code, in a description language, not a programming language, but still code.

greg0ire
The HTML sections are Markup (HyperText Markup Language). The JavaScript section is source code.
FrustratedWithFormsDesigner
+2  A: 

Markup is the most correct answer. It is, after all, the Hypertext Markup Language.

"Code" can apply equally to markup like HTML and to a programming language. To clarify that the essence of HTML is not programming in any way, "markup" is a better choice.

VoteyDisciple
+1  A: 

If you must pick one word, I would go with code.

From wikipedia: A code is a rule for converting a piece of information (for example, a letter, word, phrase, or gesture) into another form or representation (one sign into another sign), not necessarily of the same type.

Calling html "html code" is not at all uncommon while calling something javascript markup is pretty rare.

Randall
+1  A: 

Any markup is a kind of code (a strict code that represents some desirable output). But the pieces of JS are not markup. Therefore I'd say this is a piece of code, where some parts are also markup.

liori