fenway Posted September 14, 2009 Share Posted September 14, 2009 For the purposes of programming, I consider anything resembling a language to have syntax, not markup -- so HTML falls outside my definition. Frankly, I don't care how the "L" came about. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918297 Share on other sites More sharing options...
newbtophp Posted September 14, 2009 Share Posted September 14, 2009 Looks like all the staff are against HTML being a language. 1 persons opinion VS. the phpfreaks staff I know which side i'd agree with. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918349 Share on other sites More sharing options...
Daniel0 Posted September 14, 2009 Share Posted September 14, 2009 For the purposes of programming, I consider anything resembling a language to have syntax, not markup -- so HTML falls outside my definition. Frankly, I don't care how the "L" came about. But HTML is not a programming language. It's a markup language. That's like saying English isn't a language just because it is not a programming language. Things can be languages without being programming languages, you know. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918362 Share on other sites More sharing options...
.josh Posted September 14, 2009 Share Posted September 14, 2009 To me, language markup and markup language are two different things. Yes, it is "officially" called markup language, but IMO clearly it should have been called language markup. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918365 Share on other sites More sharing options...
saltedm8 Posted September 14, 2009 Author Share Posted September 14, 2009 Looks like all the staff are against HTML being a language. 1 persons opinion VS. the phpfreaks staff I know which side i'd agree with. I think you alt to read the thread before making comments like that, Daniel agrees with me and he is the administrator status in a forum or even a majority, does not always make something right Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918367 Share on other sites More sharing options...
Philip Posted September 14, 2009 Share Posted September 14, 2009 Looks like all the staff are against HTML being a language. 1 persons opinion VS. the phpfreaks staff I know which side i'd agree with. Daniel and I both have said HTML is a language - it just is not a programming language. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918368 Share on other sites More sharing options...
saltedm8 Posted September 14, 2009 Author Share Posted September 14, 2009 now I think this is not about whether its a language of not, its about whether when using it, are you programming or not ?? ( this could go on forever, im quite enjoying it hehe ) Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918371 Share on other sites More sharing options...
newbtophp Posted September 14, 2009 Share Posted September 14, 2009 I think you alt to read the thread before making comments like that, Daniel agrees with me and he is the administrator Maybe status in a forum or even a majority, does not always make something right True, but its just my opinion... ^^ Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918379 Share on other sites More sharing options...
Philip Posted September 14, 2009 Share Posted September 14, 2009 It's not a programming language. I think the w3 consortium defines what html is pretty well: To publish information for global distribution' date=' one needs a universally understood language, a kind of publishing mother tongue that all computers may potentially understand. The [b']publishing language[/b] used by the World Wide Web is HTML (from HyperText Markup Language). Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918380 Share on other sites More sharing options...
Daniel0 Posted September 14, 2009 Share Posted September 14, 2009 To me, language markup and markup language are two different things. Yes, it is "officially" called markup language, but IMO clearly it should have been called language markup. It's not marking up language, it's markup up content. Content doesn't have to be (natural) language (e.g. English). So it could be an image of a bird, a video of a bird eating a worm. It could be the representation of an entity of a third party program as well (e.g. Flash or Silverlight). HTML has a precisely defined grammar and syntax. It is very specific in what you are and what you are not allowed to do. Parsing it would be done using methods you would learn in any compiler course (lexical analysis, then semantic analysis, etc.). The grammar is defined using another DSL called DTD. HTML is parsed into what's called DOM, and it is given representation by another DSL called CSS. You are right, it is not a programming language, because you cannot program a computer with it. Your argument (that HTML is not a language of any form) is flawed because you are making the assumption that language = programming language, but that is a false assumption. You cannot conclude anything based on false premises. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918381 Share on other sites More sharing options...
fenway Posted September 14, 2009 Share Posted September 14, 2009 When I said "for the purposes of programming", I meant for comparison PHP to HTML. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918457 Share on other sites More sharing options...
Daniel0 Posted September 14, 2009 Share Posted September 14, 2009 The only thing I'm arguing against is that CV claimed that HTML and CSS aren't any type of language at all. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918460 Share on other sites More sharing options...
.josh Posted September 14, 2009 Share Posted September 14, 2009 The only thing I'm arguing against is that CV claimed that HTML and CSS aren't any type of language at all. I concede that in the broadest of terms, it can be classified as "a language," although I maintain that it would be better classified as something else, like fenway's suggested "template". But in the context that it is used in 99% of the time, that's where I have issues. The issue being that average Joe does NOT make the distinction between markup language vs. programming language. My compromise is renaming it to htlm instead of html, in the hopes that people can better understand that it is not a programming language. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918510 Share on other sites More sharing options...
Daniel0 Posted September 14, 2009 Share Posted September 14, 2009 It's not a template though. It only conveys semantic information about content (which is not necessarily language). It's a way of representing structured data that is to be parsed into a tree like data structure known as DOM. Only when you combine it with CSS can you have a template. HTML conveys no presentation or visual information whatsoever (except tags like <b> and <i>, but these are perversions of the language forced into the standard by the industry). DOM may then contain information from also CSS and Javascript, and that combined is what gives a web page. Each HTML tag has a set of standard CSS attributes associated with it. For instance, <h1> is typically a block level, bold face element that is larger than regular text, and has a vertical margin to separate it from surrounding elements. However, these rules are not defined in HTML, but in CSS. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918520 Share on other sites More sharing options...
.josh Posted September 14, 2009 Share Posted September 14, 2009 okay... markup standard? markup description? markup rules? markup definitions? markup (all by itself, just like .htm pages)? markup information? Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918525 Share on other sites More sharing options...
Daniel0 Posted September 14, 2009 Share Posted September 14, 2009 Markup......... language? Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918527 Share on other sites More sharing options...
fenway Posted September 15, 2009 Share Posted September 15, 2009 HTML conveys no presentation or visual information whatsoever (except tags like <b> and <i>, but these are perversions of the language forced into the standard by the industry). I couldn't disagree more -- the entire purpose of the markup is to convey presentation information. That's why everyone is so upset when people use tables for non-tabular data. Just because the browser displays it better as a <table>, doesn't mean it's a "table". The fact that CSS and JavaScript can inject additional instructions that modulate the underlying HTML markup is irrelevant. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918851 Share on other sites More sharing options...
Daniel0 Posted September 15, 2009 Share Posted September 15, 2009 The reason why people get upset when other people use table tags as presentational markup is exactly because HTML shouldn't be used for presentation. If your content semantically is tabular, you use the table related tags, but that in itself does not in any way specify how it should look. You'll do that using CSS. That is the general idea in the concept called "separation of concerns" in regards to web pages; you split the web page up in the layers content (HTML), presentation (CSS) and behavior (Javascript). Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-918958 Share on other sites More sharing options...
fenway Posted September 15, 2009 Share Posted September 15, 2009 Just because the "standards" suggest that CSS is the "presentation layer" doesn't preclude the fact that every single HTML tag represents a presentation element. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-919137 Share on other sites More sharing options...
saltedm8 Posted September 16, 2009 Author Share Posted September 16, 2009 when you create a div, where is the presentation markup? you will see nothing on screen until the div is styled with css a div is just a doorway for the css to enter, it in itself is not creating any style element. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-919348 Share on other sites More sharing options...
Daniel0 Posted September 16, 2009 Share Posted September 16, 2009 [...] every single HTML tag represents a presentation element. How so? How does <h1> convey presentational information? It's only because the rendering engines attach certain CSS attributes to it when parsing. And they actually do it differently sometimes and the user may override it. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-919350 Share on other sites More sharing options...
.josh Posted September 16, 2009 Share Posted September 16, 2009 when you create a div, where is the presentation markup? you will see nothing on screen until the div is styled with css a div is just a doorway for the css to enter, it in itself is not creating any style element. not true: <div>something</div> <div>something</div> There is already markup at work, because they will appear on two separate lines. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-919436 Share on other sites More sharing options...
fenway Posted September 16, 2009 Share Posted September 16, 2009 Same goes for H1 -- you don't need any CSS to get to do display differently than non-H1 text. Regardless, I've been building web pages since 1996, when CSS didn't even exist. And _before_ CSS came along, everyone was happily creating "presentation markup" with HTML alone. BTW, the last line of the intro wikipedia article on HTML reads: The W3C, maintainer of both HTML and CSS standards, encourages the use of CSS over explicit presentational markup. So even the W3C will concede that HTML allows for "explicit presentation markup". CSS changes nothing -- it just gives you yet another way to affect the presentation. The fact that everyone really wants to ignore that HTML still -- and will forever -- let you specify when your text is bold is just silly. I'm not suggesting that it isn't better to move the presentation layer to CSS -- just that HTML has such elements. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-919497 Share on other sites More sharing options...
Daniel0 Posted September 16, 2009 Share Posted September 16, 2009 Same goes for H1 -- you don't need any CSS to get to do display differently than non-H1 text. Right, but there are no rules in the HTML specification governing how H1 should look. It's completely up to the user agent to apply additional styles to the element. Same thing goes for a multitude of other tags like A, KBD, ACRONYM, STRONG, etc. In section 9.2.1 of the HTML 4.01 specification [1] you'll see: The presentation of phrase elements depends on the user agent. I am perfectly free to write a user agent that makes all text within STRONG tags 10 times larger than the normal text and flashing in red. That would provide a strong emphasis after all, and that is all the STRONG tag is supposed to do. All the places in the HTML 4.01 specification where presentational tags are described, there is a remark saying something along the lines of "but we recommend you use CSS instead". Nowadays, the preferred way of writing web pages is to not use HTML as a template, but rather as a document describing meaningful semantic information about the various parts of the content. It's very clear to see that HTML is moving further and further away from being used as presentational markup to being used as semantic markup. Moreover, in section 11 of the HTML 5 working draft [2] you'll see: User agents are not required to present HTML documents in any particular way. This shows that HTML (in version 5) does not in any way convey presentational information. Additionally, in section 11.2 of the same document [3] you'll see: The CSS rules given in these subsections are, unless otherwise specified, expected to be used as part of the user-agent level style sheet defaults for all documents that contain HTML elements. That shows it is CSS that is responsible for the visual (or aural) presentation of the content. References: [1] http://www.w3.org/TR/1999/REC-html401-19991224/struct/text.html#h-9.2.1 [2] http://www.w3.org/TR/2009/WD-html5-20090825/the-xhtml-syntax.html#rendering [3] http://www.w3.org/TR/2009/WD-html5-20090825/the-xhtml-syntax.html#introduction-9 Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-919520 Share on other sites More sharing options...
.josh Posted September 16, 2009 Share Posted September 16, 2009 okay but all you've really shown is that html is not very good at it. Or at least, css is significantly better. Quote Link to comment https://forums.phpfreaks.com/topic/174077-cant-people-tell-the-difference-between-php-and-html/page/2/#findComment-919531 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.