What's the point of HTML

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

Lleu
Posts: 77
Joined: Sun Nov 25, 2007 9:59 pm UTC

What's the point of HTML

Postby Lleu » Mon Feb 11, 2013 4:07 am UTC

So I'm new to computers. Spent all day learning HTML. Excited by my new knowledge, I went online, looked for a thingy giving free webhosting, and prepared to put my skills to the test. Then I found out that it was mostly done with a more advanced editor that let you create text boxes and wrote the HTML for you. It's kind of disappointing. Is there any way I could write a webpage the 'hardcore' way?

User avatar
ConMan
Shepherd's Pie?
Posts: 1690
Joined: Tue Jan 01, 2008 11:56 am UTC
Location: Beacon Alpha

Re: What's the point of HTML

Postby ConMan » Mon Feb 11, 2013 5:24 am UTC

Most of the time, if there is an application that will create HTML for you based on a GUI or similar set-up, it will fall into one of two categories (sometimes both):

1) It will do so little that a day's worth of teaching yourself HTML will let you do more than it can; or
2) It will be incredibly flexible and do lots of things, but the HTML it generates is so incredibly ugly it causes web designers' eyes to implode (for a wonderful demonstration of this, try showing a designer a web page you wrote in MS Word).

Sometimes, you will hit (1) but with the ability to twerk the HTML so it can do a lot more - the old Geocities was like that to a point. I think to do more you have to find a better host, which you may or may not need to pay for.
pollywog wrote:
Wikihow wrote:* Smile a lot! Give a gay girl a knowing "Hey, I'm a lesbian too!" smile.
I want to learn this smile, perfect it, and then go around smiling at lesbians and freaking them out.

User avatar
davedrowsy
Posts: 26
Joined: Wed Jan 16, 2013 5:27 pm UTC
Location: Durham, NC

Re: What's the point of HTML

Postby davedrowsy » Mon Feb 11, 2013 9:25 pm UTC

I've done a lot of HTML editing, and I can say with confidence that "hardcore" website creation from scratch using HTML is the way to go. It's really a matter of personal preference -- maybe there is a particular website creation software that you are totally comfortable with, and would rather just use that software than try to figure out how to do what you're trying to do with HTML -- and that's fine. But I think if you really want complete control over the design of your webpage, nothing beats writing it from scratch in HTML. The more you learn, the easier and faster it gets, the sky is the limit as to the level of customization you can achieve and the kinds of cool things you can do, and another perk is the feeling of satisfaction you get when you succeed in getting your page to look exactly the way you want it, and knowing you created the whole dang thing from scratch using nothing but a simple text editor.

Dr. Willpower
Posts: 197
Joined: Wed May 28, 2008 3:55 pm UTC

Re: What's the point of HTML

Postby Dr. Willpower » Wed Feb 13, 2013 6:18 pm UTC

In response to your question, open a text editor (notepad.exe/gedit) and start writing HTML. That is how hardcore HTML writing is done. You are definitely going to want to look up CSS, and if you get really serious you'll probably want to look up JavaScript, and a serverside coding language like PERL or PHP.

Also, ditch those automated markup writers. If you want to make things you'll need to know the markup yourself. Just save yourself the time and learn it now.
Image
Hat me, bro

User avatar
freakish777
Posts: 354
Joined: Wed Jul 13, 2011 2:14 pm UTC

Re: What's the point of HTML

Postby freakish777 » Wed Feb 13, 2013 7:35 pm UTC

I'm going to make a controversial statement here.

Don't do it the "hardcore" way at first.

Depending on what type of Tools you're talking about (are we talking about Visual Studio's Designer? Adobe's DreamWeaver? NetBean's Designer? CodeCanvas? a php designer?), using the tools first and learning with them is the way to go.

Ignore the "if you showed the markup to a designer, their head would explode" nonsense for just this minute. You're new to this, and no one expects your website to be a masterpiece.

Ignore the "some designers do very little for you" talk right now.

A. Pick your designer. You can pick it at random if you want, but if you're interested in pure HTML, and not worried whatsoever about server side language, (which I think is a mistake, in this day and age, most of the non-boring sites that are profitable have server side code to take into account), the check out Code Canvas.

B. Play around with it first. Each time you drag and drop a pre-built object onto your HTML, go look at the mark up. Do you understand what it's doing? What everything is?

C. Figure out if you can create and save your own custom objects (to re-use later).

D. Now try making some sites. Did they turn out as planned? If not, why not? Go look at the HTML generated. Do you understand all of it? If the designer screwed something up, figure out what it was (this will help your knowledge of HTML immensely).

E. Take your sites that you've made, and insert HTML without the editor.


HTML designers are just like any other tool. They're supposed to make your job easier. Yes, I get that you're looking for a challenge to improve your knowledge so that it can be robust. But sometimes learning with the tool will make your knowledge more robust than had you spent an equivalent amount of time without it (and make the quality of your work after the fact better).

Would you ever consider trying to make a sculpture out of a solid rock without a hammer and a chisel? Tools exist for a reason. Clearly my analogy is pretty poor, because it's basically impossible to make the sculpture out of rock without those tools, where as it's down right trivial to create a website with Notepad and HTML.

But the point remains, tools exist for a reason. To make your job easier.

JOBGG
Posts: 5
Joined: Tue Feb 12, 2013 10:02 pm UTC

Re: What's the point of HTML

Postby JOBGG » Thu Feb 14, 2013 12:11 am UTC

For a better analogy, compare it to a computer. You can either put it together yourself, which will take more time but ensure you got a computer which is put together in a clean and logical way, and uses exactly the right components for the job you want to do. Or you could go and order one from Dell, which comes put together with specs you don't really understand. Yes, ordering one from Dell is easier, but imagine something breaks. Maybe they/you didn't put your harddrive in properly and now the connector is loose and your computer starts crashing every time you jostle against it. If you put it together yourself, easy, you'll just open up the case and fasten the connector a little. But if you ordered the computer, you'd proably have someone from dell look over it, or a qualified computer technician or whatnot.

HTML is the basis of what you see in front of you right now. It's the basic language of the web, and it tells what (is diplayed), where (it is displayed) and how (it is displayed). Essentially what those WYSIWYG (What you see is what you get) editors do is to generate HTML based on what you tell them the site should look like. Which is fine if you run a small text site, where you put your personal blog or something. But if you want to move up and actually write your own webservices, with pages which are dynamically (on the spot, based on the data you give them) generated, not knowing HTML, it's like being a painter and not knowing what paint is.

HTML is very easy to learn, with one or two concepts you'll need to wrap your head around, a little bit of syntax you'll need to learn, but not much more.

User avatar
freakish777
Posts: 354
Joined: Wed Jul 13, 2011 2:14 pm UTC

Re: What's the point of HTML

Postby freakish777 » Thu Feb 14, 2013 2:58 pm UTC

JOBGG wrote:For a better analogy, compare it to a computer. You can either put it together yourself, which will take more time but ensure you got a computer which is put together in a clean and logical way, and uses exactly the right components for the job you want to do. Or you could go and order one from Dell, which comes put together with specs you don't really understand. Yes, ordering one from Dell is easier, but imagine something breaks. Maybe they/you didn't put your harddrive in properly and now the connector is loose and your computer starts crashing every time you jostle against it. If you put it together yourself, easy, you'll just open up the case and fasten the connector a little. But if you ordered the computer, you'd proably have someone from dell look over it, or a qualified computer technician or whatnot.


No, that's an even worse analogy (because it's misleading). When you're using a Drag and Drop designer tool that creates the HTML for you, you go and you look at the HTML it generated at each step along your path so that you do understand what's going on (if you're not doing that, then clearly you have no interest in actually learning). You play with it as you're putting it together (change the text, change the tags, change the style, change everything, bit by bit, seeing how it renders in IE, FF, Chrome, Opera, Safari, etc, each time you make a change). You can't order a partial computer from Dell (maybe you can order replacement memory, but chances are you aren't taking that apart and tinkering with it).

A similar but better analogy (than both of our initial analogies) would be putting a computer together with a "friend" that's very rigid in what they're telling you to do (or with "Building Computer's For Dummies/Beginners" manual that's telling you what to do at each step), but will let you change whatever you want, and when you do so says "Once you make a change you're sorta on your own, I only know about what I know about."

Yes, building it by yourself the "hardcore" way as a beginner might give you better sense of accomplishment. But, doing it with a "friend" will probably save you a lot of time, and more importantly (in my opinion) improve your knowledge faster. Save the sense of accomplishment for when you have a better idea what you're doing.

Essentially what those WYSIWYG (What you see is what you get) editors do is to generate HTML based on what you tell them the site should look like.


Just a nitpick, traditional WYSIWYG editor's are somewhat different from Drag and Drop designers.

Which is fine if you run a small text site, where you put your personal blog or something. But if you want to move up and actually write your own webservices, with pages which are dynamically (on the spot, based on the data you give them) generated, not knowing HTML, it's like being a painter and not knowing what paint is.


Agree, at some point you need to dive in and learn the HTML (hence going in and seeing what's generated for yourself).

It might be less like not knowing what paint is, and more like not knowing how the particular paint you're using will interact with the canvas you're painting on.

For instance, using spray paint and a cut-out you made yourself (or bought) to create a particular pattern quickly,
and not really understanding what surfaces spray paint doesn't work well on (spray paint tends to run, and on some surfaces, and at certain temperatures it's more likely to run, making it less fun to work with).

This maybe brings us to the best possible analogy. Spray paint and cut outs. HTML is like spray paint. Using a drag and drop designer is like having a pile of pre-made commonly used cut-outs in your tool box. Some of them are going to look tacky, and using only them to spray paint a picture with won't help you become the next David Shea (or Banksy, or whoever). But by using them you can learn an awful lot about the spray paint itself, and at the very least, make a functional picture that tells a story (make a usable website), and about tools. If you're a "true artist" (web designer) eventually you'll have an idea for an art piece (art piece? website) you want to make that can't be made with just the cut outs. You'll either need to learn how to spray paint without cut-outs (which should be easier because you have a better understanding of spray paint at this point, and a steadier hand), or learn how to make your own cut outs.

Just keep in mind in the back of your head, that there's more to websites and the internet than just HTML.

Interesting side note on webservices. I'm not accustomed to working with any webservices that have anything to do with HTML. XML on the other hand...

User avatar
Xanthir
My HERO!!!
Posts: 5400
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: What's the point of HTML

Postby Xanthir » Sun Feb 17, 2013 11:34 pm UTC

Looking at the HTML generated by a WYSIWYG editor is almost certainly a horrible idea. Those things pretty much universally generate absolutely loathsome code, with unnecessary <div>s used everywhere, auto-genned unreadable class names, and no semantics in sight (or worse, totally misused semantics, like using <em> for literally everything that's ever put in italics).

As an experienced webdev, I highly recommend learning it yourself, by hand. It's not hard if you have good tutorials - I recommend going through the tutorials at http://www.htmldog.com/, as they were helpful to me when I was first starting, and have helped several more of my friends. Its guides are slightly outdated (they teach you XHTML 1, when using XML on the web is a bad idea; they don't have anything on HTML5, though they've announced an overhaul and rewriting to include HTML5 and more CSS3 stuff launching this quarter), but still really good and quite valuable.

For gods sakes, though, avoid the site W3Schools AT ALL COSTS. It's not associated with the W3C (the actual standards body for most web stuff - we've asked them to change their name, and offered to buy their domain, but they won't budge), and a lot of its information is *very* outdated and bad. Just ignore it forever.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

KnightExemplar
Posts: 5494
Joined: Sun Dec 26, 2010 1:58 pm UTC

Re: What's the point of HTML

Postby KnightExemplar » Mon Feb 18, 2013 4:28 am UTC

The majority of websites are not in fact static HTML pages. They are programs that output HTML. And for the most part, writing a program that generates HTML requires you to understand HTML.

For example, phpbb (aka: the forums), convert the text you type into this website, and convert it into HTML. That conversion process requires an understanding of it, if you were ever to write forum software. There are also numerous security issues that come up that can only be described in HTML.
First Strike +1/+1 and Indestructible.

User avatar
freakish777
Posts: 354
Joined: Wed Jul 13, 2011 2:14 pm UTC

Re: What's the point of HTML

Postby freakish777 » Tue Feb 19, 2013 3:32 pm UTC

Xanthir wrote:Looking at the HTML generated by a WYSIWYG editor is almost certainly a horrible idea.


Yes, almost. Which is why I suggested good drag and drop editors like Visual Studio's Designer, Net Beans Designer and CodeCanvas instead...

User avatar
undecim
Posts: 289
Joined: Tue Jan 19, 2010 7:09 pm UTC
Contact:

Re: What's the point of HTML

Postby undecim » Wed Feb 20, 2013 5:06 am UTC

You don't need hosting to code a website. You can just open the HTML page in your browser. You only need hosting in order to publish your website. Get a good editor, such as Notepad++
Use Sass to work with CSS.
Use GIMP to work with images.
When you want to start doing more advanced visual stuff (like complicated animations), use jQuery.

Make sure any tutorial you're using is referring to HTML 5. Web technologies change every day, so it's easy to find an outdated guide. Also, avoid using w3schools.com. Better resources include: The Mozilla Developer Network, Opera Web Curriculum, WebPlatform Wiki,

freakish777 wrote:D. Now try making some sites. Did they turn out as planned? If not, why not? Go look at the HTML generated. Do you understand all of it? If the designer screwed something up, figure out what it was (this will help your knowledge of HTML immensely).


D. Have you ever seen the markup these things generate? (if it's even in HTML to begin with... Wix for example used to only use flash) First of all, they're usually minimized. Then the class names used with CSS are just serial numbers. There's nothing to understand unless you're a rendering engine.

Better is to find example pages, with will have sensible markup that hasn't been minimized.
Blue, blue, blue

User avatar
freakish777
Posts: 354
Joined: Wed Jul 13, 2011 2:14 pm UTC

Re: What's the point of HTML

Postby freakish777 » Wed Feb 20, 2013 3:45 pm UTC

undecim wrote:D. Have you ever seen the markup these things generate?


.... Yes.... Again, I didn't suggest using a general WYSIWYG editor (which everyone seems to remember one from the early 2000s for some reason), but a good drag and drop designer. I've used Visual Studio's Designer close to daily for 5+ years...


Code: Select all

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
 
</title></head>
<body>
    <form method="post" action="default.aspx" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTEwMDg2NzI3ODdkZGe442pSB06toawP8BcmUfMP27ZLOrkHbUe2T1A/LEMj" />
</div>
 
<div class="aspNetHidden">
 
   <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAAW4d05hxaj4eTAA9JIPuPpHSs7wasCocaOJWoyWWBatLeaRDy2Y/CIv4DeAKgIdseNUYD/+FL9vkv2qPaxOOQjly8FS5SrYhNc+rGubAZQh7Bl2z3633pZ8aVsn2S58YdOduqn8V76Z9Y12YJ0LFc6x" />
</div>
    <div>
        <table id="Table1">
   <tr>
      <td valign="top">
                    <label>Nodes</label><br /><input type="submit" name="BruteForce1" value="Permutation" id="BruteForce1" />
                    <br />
                    <input type="submit" name="myAlg" value="Optimized" id="myAlg" /></td><td><textarea name="paths" rows="2" cols="20" id="paths" style="height:600px;">
</textarea></td><td><span id="answer"></span><span id="answer2"></span>
                            <br />
                            <span id="outTxt"></span></td>
   </tr>
</table>
    </div>
    </form>
</body>
</html>


So, who wants to tell me the above is unreasonable HTML to look at and edit by hand because it was created with Drag and Drop editor? Could the hidden fields be named a little more reasonably and not have ugly values? Sure. Could it be formatted a little cleaner? Sure (it's not that hard to clean it up afterwards, or get a program to do it for you).

Here's what's not wrong with it though:

Unnecessary <div>s everywhere. (there will be a couple, that isn't going to make or break your website or your understanding of HTML, but they certainly aren't everywhere).

<em> tags. A good Drag and Drop Designer doesn't really care about text being highlighted, bolded, italicized, etc, it expects you to be able to look that up on your own.

Autogenned unreadable names. __VIEWSTATE and __EVENTVALIDATION are readable. The values in the hidden fields are not readable. But that's to be expected, and completely reasonable. Most good Drag and Drop Designers don't really care about CSS either and leave it up to you to know what you're doing. Obviously, a class name like aspNetHidden is readable, and if you know CSS you would probably hazard a guess that the divs being assigned those classes are getting their visibility set to false.



I'm not advocating for WYSIWYG editors where you put together a read only blog with it (and maybe even a comments section!). I'm advocating for Drag and Drop Designers, where you drag your Buttons, Textboxes, Tables/Rows/Cells, Labels, Dropdown Lists, Images, Media Players, Calendars, etc onto your canvas and play around with some pre-built DOM objects.

Make a CSS class, then add it to one of your Buttons. What do you have to do to round the edges on it (or get it to look the way you want)?
Take out parts of what the Drag and Drop Designer generated. Does it still work after you removed that?
Add parts to what it generated. Does it still work after you added stuff?

User avatar
Steax
SecondTalon's Goon Squad
Posts: 3038
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: What's the point of HTML

Postby Steax » Wed Feb 20, 2013 5:40 pm UTC

If you're a designer, make your design as a framework. There's no point using anything that generates HTML, as developers will most likely need to twerk the code to work well with a templating engine or CMS anyway.

@freakish777: The problem with that? Layout mixed with code. When I see an HTML page for a form, I don't want to care about how it's laid out or how it looks. Your page boils down to this:

Code: Select all


<form method="post" action="default.aspx" id="form1">

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="[snip]" />
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="[snip]" />

<label>Nodes</label><br /><input type="submit" name="BruteForce1" value="Permutation" id="BruteForce1" />
<input type="submit" name="myAlg" value="Optimized" id="myAlg" />

<textarea name="paths" rows="2" cols="20" id="paths" style="height:600px;"></textarea>

<span id="answer"></span>
<span id="answer2"></span>
<span id="outTxt"></span>

</form>


That is a lot easier to work with.

"Drag and drop" is still WYSIWYG. What's the difference? "Drag and drop" just refers to how you place elements on a canvas. You still build pages by making the canvas look like how you want it too... Which, well, is WYSIWYG by definition.

And no WYSIWYG editor can read your mind on what you're trying to do. Anyone who works with HTML should know and get used to writing HTML, or stick to doing things statically so someone who does know HTML can do it. I've always found it a lot easier to build HTML from scratch than try to mold WYSIWYG output for a template engine or javascript.
In Minecraft, I use the username Rirez.

User avatar
freakish777
Posts: 354
Joined: Wed Jul 13, 2011 2:14 pm UTC

Re: What's the point of HTML

Postby freakish777 » Wed Feb 20, 2013 8:41 pm UTC

Steax wrote:If you're a designer


Personally, I've never understood how everyone assumes that once you start talking HTML that everyone talking about it is a designer, but whatever.

The problem with that? Layout mixed with code.


Not sure why mixing layout (tables + divs) with code is important. Some elements are for organizing what it looks like. I mean, I put the table and page breaks in on purpose. To organize it. VS's Designer didn't do that all on it's own. Yes, it created a couple <div>s on it's own by default, and you can take some of them out if you want (the <div>s around the hidden inputs not so much). No, it's not going to break anything.

When I see an HTML page for a form, I don't want to care about how it's laid out or how it looks. Your page boils down to this:

Code: Select all


<form method="post" action="default.aspx" id="form1">

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="[snip]" />
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="[snip]" />

<label>Nodes</label><br /><input type="submit" name="BruteForce1" value="Permutation" id="BruteForce1" />
<input type="submit" name="myAlg" value="Optimized" id="myAlg" />

<textarea name="paths" rows="2" cols="20" id="paths" style="height:600px;"></textarea>

<span id="answer"></span>
<span id="answer2"></span>
<span id="outTxt"></span>

</form>



And, if I change what I put in with the Designer, it would come up as almost exactly that (there would still be <div>s around the two hidden inputs)....

"Drag and drop" is still WYSIWYG. What's the difference?


Good Drag and Drop designers are like spray paint cut outs of things you use over and over again, and the best ones let you define your own "cut outs" so when you've got a Calendar just the way you like it, you want to place on a page, you can just drag it and be done (instead of opening up an HTML file and copying and pasting). They're geared towards Web Developers, as a tool to decrease the time it takes to get your site up and running. They typically also are made with input to server side functionality in mind (VS Designer, Java NetBeans Designer).

Traditional WYSIWYG editors are, in fact, awful. They're geared towards people who have no clue about websites, code, or anything else, and want a website anyways (think small shop/business owners that want a tiny blog and their store hours and some pictures of their products, and don't have the budget to hire a web designer to make something good). Google is not helping people find their website (unless the person knows the name of the business beforehand), their business card is. Their sites look similar to something you would have seen hosted on GeoCities in the late 90s, early 2000s. Barring that, they're the next step up. A crummy WordPress blog (yes, yes, WordPress does some great things, and if you know what you're doing you can make some great looking sites with it, personally I can't stand WordPress not out of it's limitations on the front end, but it's total mess of a file/data structure in the back end).

Anyone who works with HTML should know and get used to writing HTML


Yes. I just disagree over how the quickest way to learn it is and have a different experience with what the best way to get a site up and running. Between a Designer and manually typing HTML, there's pretty obvious pain points with Grids and other data heavy sites when you're doing it by hand over using a Designer. I'd rather not write a for loop for my SQL queries to create table rows, links to Page numbers, etc, and inject the HTML. Having a DataGrid or DataView and setting it's DataSource to the results of the SQL query and be done? I'll take "Not reinventing the wheel" please.

A good Drag and Drop Designer should jump start your understanding, instead of being stuck in "I think this is right from the examples I've seen, but I'm not sure" mentality for longer than you need to. You have an element you can drag onto a page (let's say an <asp:label> ). Do it and see what it generates (it generates a span, usually). Change your <asp:label> around, and you're now learning about spans very quickly (instead of going and looking up the next example online).

User avatar
Steax
SecondTalon's Goon Squad
Posts: 3038
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: What's the point of HTML

Postby Steax » Wed Feb 20, 2013 9:54 pm UTC

freakish777 wrote:
Steax wrote:If you're a designer


Personally, I've never understood how everyone assumes that once you start talking HTML that everyone talking about it is a designer, but whatever.

The problem with that? Layout mixed with code.


Not sure why mixing layout (tables + divs) with code is important. Some elements are for organizing what it looks like. I mean, I put the table and page breaks in on purpose. To organize it. VS's Designer didn't do that all on it's own. Yes, it created a couple <div>s on it's own by default, and you can take some of them out if you want (the <div>s around the hidden inputs not so much). No, it's not going to break anything.


Well, if you're a developer, you'll definitely want to know master HTML. It's a core competency. The rest of this discussion applies to other tasks which benefit from knowing HTML, but don't necessarily require it, such as web design.

Mixed layout with code was what started the CSS revolution a decade ago. You don't want any table markup where tables aren't in use - it's called semantic design, and is responsible for the vast migration to using CSS floats and layout over tables and font elements. That's why I showed my code sample: it represents what your HTML should be. It can also very easily break something; many a CSS file will try to define a standard table style setup, like applying <th> paddings and sizes. Guess what happens when this accidentally applies to an invisible table someone left somewhere?

As for organizing code, you'll want to use the semantic way. This usually means divs, but since you're making a form, you should use the fieldset element instead.

I'm not going to refute the last part because I've never used this particular application (please don't just call it "the designer", that's usually a human role).

Personally, I find HTML to be the kind of language where being "right" isn't a big deal. There are obviously best practices, but unlike making mistakes in other languages - which often leads to severe security holes or incompatibilities - most browsers will interpret HTML more or less the same. It's better to jump in and learn the ropes quickly; the first few months will be full of learning new tags and trying to figure out which tag to use when. But it doesn't take long at all to get used to. Fiddling with GUIs is a terrible way to learn how an element works; it's how people think it's a good idea to pepper inline styles and inline javascript. Stuff like that.
In Minecraft, I use the username Rirez.

User avatar
Xanthir
My HERO!!!
Posts: 5400
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: What's the point of HTML

Postby Xanthir » Thu Feb 21, 2013 4:43 am UTC

Browsers will, in fact, interpret HTML *exactly* the same way these days. It was a titanic effort to figure out and specify parsing properly, but it was finished a few years ago, and all modern browsers follow the spec now pretty much completely.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

User avatar
thoughtfully
Posts: 2253
Joined: Thu Nov 01, 2007 12:25 am UTC
Location: Minneapolis, MN
Contact:

Re: What's the point of HTML

Postby thoughtfully » Thu Feb 21, 2013 8:18 am UTC

Xanthir wrote:Browsers will, in fact, interpret HTML *exactly* the same way these days. It was a titanic effort to figure out and specify parsing properly, but it was finished a few years ago, and all modern browsers follow the spec now pretty much completely.

Yes, but what about CSS? *ducks*
Image
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

User avatar
Steax
SecondTalon's Goon Squad
Posts: 3038
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: What's the point of HTML

Postby Steax » Thu Feb 21, 2013 9:00 am UTC

To be fair, most of CSS is also pretty decently standard, especially for basic rules and on 90% of the population. The only major incompatibilities are the broken old IE box model, and very new features with varying levels of support.
In Minecraft, I use the username Rirez.

User avatar
freakish777
Posts: 354
Joined: Wed Jul 13, 2011 2:14 pm UTC

Re: What's the point of HTML

Postby freakish777 » Thu Feb 21, 2013 2:17 pm UTC

Steax wrote:You don't want any table markup where tables aren't in use - it's called semantic design, and is responsible for the vast migration to using CSS floats and layout over tables and font elements. That's why I showed my code sample: it represents what your HTML should be. It can also very easily break something; many a CSS file will try to define a standard table style setup, like applying <th> paddings and sizes. Guess what happens when this accidentally applies to an invisible table someone left somewhere?


My point was that you should be the one making a CSS file, and figuring out when stuff breaks and then why. It's not like CSS files magically appear in Drag and Drop Designers.
Personally, I prefer explicitly setting classes as opposed to having HTML objects inherit properties. It makes finding the CSS responsible much easier (especially for new developers).


(please don't just call it "the designer", that's usually a human role).


My apologies, but it's pretty hard to stop calling something that's marketed and referred to as a Drag and Drop Designer as anything else (shortening it comes naturally, Microsoft calls it the Design View and you can split between HTML/XAML and the Design View, personally I do everything in the mark up, but there's other advantages to a good program, like intellisense). That's (sort of) like Licensed Architects complaining Software Architects using their term. For reference, in most US States where a License is given to Architects after they pass a test, one cannot call themselves an Architect if they haven't passed the test and been given a License, similar to how a Lawyer must pass the Bar exam and then keep their License to practice law, in NY State it's 7 exams and a 2 year internship. My sister (a licensed Architect) never stops complaining to me about how unfair it is to Architects that when they look for a job on Monster (or Careerbuilder, or a job message board aggregator, or where ever) that 75% of the jobs are for Software Architects. Tough. Deal with it. No Software Architect is claiming to be a Licensed Architect on their resume or in a job interview. No Drag and Drop Designer is claiming it can "design a website for you," only help you do it yourself.

Personally, I find HTML to be the kind of language where being "right" isn't a big deal. There are obviously best practices, but unlike making mistakes in other languages - which often leads to severe security holes or incompatibilities - most browsers will interpret HTML more or less the same. It's better to jump in and learn the ropes quickly; the first few months will be full of learning new tags and trying to figure out which tag to use when. But it doesn't take long at all to get used to. Fiddling with GUIs is a terrible way to learn how an element works; it's how people think it's a good idea to pepper inline styles and inline javascript. Stuff like that.


I concur on being "right" in HTML, and disagree on fiddling with GUIs. Fiddling -> learning with trial and error. A good Drag and Drop Designer is like having the best example cheat sheet to work from and means that what's produced is "right" a higher percentage of the time than picking a random HTML Help Site and following their example. Almost everyone learns HTML through some amount of trial and error, because no one in their right mind pays someone else to teach it to them (and if you're interested in paying someone to teach you HTML, no I won't do that, but I do have a bridge to sell you).

User avatar
Steax
SecondTalon's Goon Squad
Posts: 3038
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: What's the point of HTML

Postby Steax » Thu Feb 21, 2013 2:32 pm UTC

That's exactly the issue. All things concerning layout should be in CSS, and if the application generates layout - but not CSS - then you have a semantics problem right there.

This is really my core issue. The rest of these points are just answering points or trying to clarify bits.

--

I'm not complaining about "the designer" as in technically; I'm kind of confused about the terminology here. What exactly is this "Drag and Drop Designer" thing you're mentioning? The capitals hint that it's a product or service of some sort, but a quick search only turns up a content management system. This is the first time someone called their WYSIWYG editor "the designer"; I'm not debating the validness of the term, but I'm making sure we're talking about the same thing here. To be clear, when I say "the designer", I mean the human creating designs based on visual guidelines, interface patterns, user experience plans and information architecture (or whatever you want to call it).

I'll partially agree with you that tinkering with a decent WYSIWYG GUI can give a few pointers. That worked for me... In 2005, when the community wasn't as active as it is now. And they're free... I'm not sure where you're getting the "pay someone to teach HTML" thing from. Of course, people may learn things differently; I just suggest that most corporate-designed, can-all-do-all WYSIWYG massive row of "properties grid" doesn't serve as very good example at all, and there are better resources available today.
In Minecraft, I use the username Rirez.

User avatar
Xanthir
My HERO!!!
Posts: 5400
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: What's the point of HTML

Postby Xanthir » Thu Feb 21, 2013 5:02 pm UTC

thoughtfully wrote:
Xanthir wrote:Browsers will, in fact, interpret HTML *exactly* the same way these days. It was a titanic effort to figure out and specify parsing properly, but it was finished a few years ago, and all modern browsers follow the spec now pretty much completely.

Yes, but what about CSS? *ducks*

That's why I'm rewriting the CSS parser: http://dev.w3.org/csswg/css3-syntax/.

Once I finish this up, I plan to rewrite WebKit's parser implementation to match.

Of course, parsing and *using* are two very different beasties.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

myrcutio
Posts: 44
Joined: Wed Dec 30, 2009 7:28 pm UTC

Re: What's the point of HTML

Postby myrcutio » Mon Feb 25, 2013 8:40 pm UTC

I would suggest downloading Sublimetext and just start writing tags and see what happens. Add a css file and put background colors, borders, hover states and such to different elements and play with it. Eventually you will want to start getting into templating systems (please don't start with PHP, try handlebars and make some lists). But for now, just learn what the tags are, learn how classes, ids, style rules, and http in general work. There are fancier IDEs that will do some code completion and WYSIWYG stuff, but that won't help you right now it'll just confuse you.

Eventually you want to get to the point where you can take a screenshot of a site, build the DOM (fancy term for all the visible HTML tags), and style it to look the same. Then you're ready for level 2.
"Lightning must have hit it, and now it won't work in anything but Windows 95."

Faustus runs afoul of Microsoft.


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 14 guests