Jump to content

Bad HTML


Nim199

Recommended Posts

Hi, I thought it might be intersting, and helpful, if we had a topic were we could disscuss 'Bad' HTML.By seeing how poor HTML can be, and still work will hopeful help us to look for errors not noticed by the browser (it shows up as though it were perfect).

Link to comment
Share on other sites

'Bad' HTML to me:- Not coded like XML (missing end tags, capital letters, not well-formed)- Table layouts (I like divs a lot better)- I read on Sitepoint about using "fake" XHTML (the mime type still being text/html, so it is buggy HTML got me to switch back to HTML.)- This one isn't really a big one to me, but still found interesting was using the wrong HTML elements for certain things.

Link to comment
Share on other sites

Using non-standards that don't display well in most browsers is bad to me. <FONT family="arial" size=12><p align="center">Also, using style attributes i/s of css is pure nightmare to any webdevil.</font></p><BR> Specify a class for this type of text and close your linebreaks.

Link to comment
Share on other sites

I have mangled some code, and it can't really get any worse. If you can make any poorer, show us!

<html><bdy><h2 >Music In The Background</h"><bgsound src="beatles.mid"><body/></hmlt>

This is how it should look: http://www.w3schools.com/media/tryit.asp?f...a_soundmidibackIf you copey he above code into the tryit_editor, it gives the same result.

Link to comment
Share on other sites

I have mangled some code, and it can't really get any worse. If you can make any poorer, show us!
<html><bdy><h2 >Music In The Background</h"><bgsound src="beatles.mid"><body/></hmlt>

This is how it should look: http://www.w3schools.com/media/tryit.asp?f...a_soundmidibackIf you copey he above code intot eh tryit_editor, it gives the same result.

Not in Opera. But then Opera doesn't support the <bgsound> element anyway, so... :)
Link to comment
Share on other sites

I had made a list of deprecated elements before, thats been buried beyond survival though. Is it really good to have high doses of bad things in a place? Even for learning purposes, people still may see something and go use it if its bad or not. They may also not use it ever though...

Link to comment
Share on other sites

  • 5 months later...

Sorry, about my poor typing. Other non-sence welcome!If you post your idea of 'Bad' HTML here, I will compile it and post it later on.

Link to comment
Share on other sites

Here is some bad HTML I ran into recently (filler content used to disguise the identity of the site):

...Praesent ut justo. Donec adipiscing magna. Duis quam augue, lacinia ut, convallis sed, semper sit amet, sem. Sed quis sapien.		  <p><br>		  </p>		  <p><font face="arial" size="2"><br>			</font><font face="arial" size="2"><br>			</font></p>		  </div>		</font></center>	  <font face=arial size=2> 	  <p> 	  <p> 	  <p> 	  <p> 	  </font><p><font face=arial size=2><br>		<font size=3></font> </font>Nullam ac sem sit amet urna suscipit luctus. Phasellus elementum dignissim mauris. Duis auctor, sapien in ultrices bibendum, nulla turpis facilisis est, sed egestas tortor justo ut mauris....

then there is:

...Morbi in metus. Integer aliquam enim eget nisi. Mauris orci eros, tempor non, aliquet a, facilisis in, nisi. Nulla vel justo non augue pretium blandit.</font></p>				<h6><font face="Arial, Helvetica, sans-serif" size="4"><br>				  </font></h6>				<p><font face="Arial, Helvetica, sans-serif" size="4"><br>				  </font> </p>				<p> </p>				<p><font face="Arial, Helvetica, sans-serif" size="2">Rev 11/06</font></p>Aliquam diam. Nulla justo tortor, pharetra vitae, consectetuer a, rutrum sit amet, turpis. Vivamus ac felis....

or

...<font face="Arial, Helvetica, sans-serif" size="3"> </font><center>			  <center>				<h1 class="style1"><font face="Arial, Helvetica, sans-serif">THE [company name] RESPONDS TO<br>	[a topic in the news]</font></h1>			  </center>...

I've got tons more if you really want it . . . :)

Link to comment
Share on other sites

And this was on the Internet? Pah!

Link to comment
Share on other sites

I can't actually get over how funny that is!!!But very well said.

Link to comment
Share on other sites

This might interest you...Go to the www.google.com, and view the source.

Link to comment
Share on other sites

Qoutation marks are missing, not XHTML strict...

Link to comment
Share on other sites

It's not a requirement to use XHTML strict, and it's not bad if you don't. Most of my sites are HTML 4 strict (the same as Google). Quotes are optional in HTML for attribute values that are alphanumeric only.That being said, the current Google homepage doesn't validate, mostly due to the use of XHTML tags and some missing attributes.

Link to comment
Share on other sites

This says it all - there is nothing worse than a myspace page. Look (if you dare) at one I stumbled across:http://www.myspace.com/seahawkernation(if you must know its related to the fact that I own two Porsche 924s - this guy is selling his - if you can find it on the page)db1166-pumpkin-puke.jpg
Link to comment
Share on other sites

  • 1 month later...

I find it mystifying that so many people who have nothing better to do than tweak their myspace profiles are gaining an interest in web design. De-cyphering myspace profile source is like smoking crack, meth, and shooting up concentrated coffee and then trying to do brain surgery. As far as W3C standards go... :::rant:::XHTML Strict is a little too strict. The target="_blank" being deprecated is illogical because when you enter another site theoretically you're in a different location so there shouldn't be any back links. Having a never ending stream of sites mesh together into one windows history is sloppy. I would like to see that amended and changed so that instead of deprecating target="_blank", make a guideline stating that all external links should be identified as external (or maybe even go as far as modifying the XHTML DTD so that links that start with http:// have some symbolic way if appearing different from normal links).:::rant:::I also think that it would be good for W3C to add a section to the site that has all of the browser specific tags and display prominently that they are all deprecated. Maybe, if M$ sees that freakish atrocities like their <blink> tag have been rejected they'll know what source bloat fat to trim.Speaking of bloated software that consume excess system resources. I accidentally stumbled on this article that states how IE might actually be stimulating out economy.http://humorix.org/articles/2003/04/grant/

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...