- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I respectfully disagree.
Admin
I still use the self-closing BR tag style. Just force of habit, I guess...it looks wrong without, to me. Don't think it does any harm?
Admin
XHTML and self-closing tags are the correct way. HTML is XML, despite whatever decisions HTML5 made to intentionally spite that idea.
Admin
I came here to write this. What is this hatred for properly formed markup? Shouldn't it be as loveable as cute puppies?
Opponents of XHTML are eating the dogs!!
Admin
I mean, I prefer XHTML style, but I recognize that's a fight which I've lost. And I'll fight many a lost cause, but this is just one I can't get too het up about.
Admin
+1 for still using self closing tags. To me, the tag is not properly formed if isn't closed.
Admin
There is something important missing, Bob from QA said: In order to center the text on the screen, it needs several just as he had learned in his Business Design Master class.
Admin
No, it's neither XML nor, any longer, SGML. Per https://html.spec.whatwg.org/#parsing:
Admin
Per the Mozilla docs: Self-closing tags (<tag />) do not exist in HTML.
Fun programming workaround: I've got a little app on the Windows store for EPUB type e-books. An EPUB book is just HTML in a ZIP file with some other bits and bobs. Recently, a major publisher (project gutenberg) decided that every single new EPUB book would include the string <pre /> at the start. Per the Mozilla docs, when this is shown as HTML, the last slash is removed, turning every single new EPUB into a "PRE" formatted book, which looked absolutely awful. My workaround was to search all of the HTML for that particular string and remove it.
Source: https://developer.mozilla.org/en-US/docs/Glossary/Void_element
Admin
If this represents the worst of the code, Marco had better hold onto the job however he can.
Admin
Yeah.
Change request: The banner tag should be banner sized. Later: It's still not banner sized, it changes size...
Later Incident: The banner area is broken. Lots of discussion later: The banner area is all white. It's broken!
After years in support and development, I see this one coming a mile away...
Admin
Missing: several "and-n-b-s-p-semicolon"s. For horizontal alignment, you know...
Admin
@jkshapiro, is this where I suggest parsing HMTL with Regular Expressions?
Admin
I stand by my statement. HTML5 has tried very hard to gaslight the world that it isn't XML, even going so far as defining their spec specifically to break XML rules, I'm looking at you void elements and boolean attributes. Regardless, the fact remains, HTML is XML and there is no ration reason that it shouldn't be.
Admin
And I stand by the statements I now make, that XML was a gimmick of little long-term consequence and XHTML in particular was a vain attempt to rewrite history.
Admin
TRWTF is using jQuery, obviously.
Admin
I know web browsers have to be flexible in their HTML parsing, but come on, parsing and rendering structured text content inside an image tag is just totally bonkers.
Admin
We will live the rest of our dev lives in the rickety tent camp called HTML that was hastily erected by idiot farmers & untrained factory workers who'd joined the mad gold rush that was the original WWW. If only we would / could not only build a shiny but separate new city nearby, but also get up the gonads (of either sort) to burn the tent city to the ground. Then we could live in nice surroundings again.
Admin
You're saying "Java is C. Python is C." This is not the case. While both of those languages utilize what we all call "C syntax" they are not C. Just like HTML is not SGML is not XML.
Admin
The only rational explanation for the HTML5 syntax spec is that it documents what the major browsers were already doing (and horrible legacy code relies on). Meanwhile the only way to make "HTML is XML" actually true is to assume you elided some rather load bearing words.
HTML specifies a data model, schema, semantics, and a number of scripting APIs. It also specifies two ways to serialise that data model: the HTML5 syntax, or XML. They're nearly equivalent, in particular document.write() is forbidden in XML mode, probably because of how horrible it is to implement and it's legacy nonsense anyway.
This is a very different scope to XML, which doesn't get past the data model until you're in the realm of companion specs layered on top (okay, there's DTDs to provide some sort of schema) and doesn't specify a schema.
Denying any of this because "there's no rational reason" is pointless. And irrational.
Admin
self closing tag goes BRrr?
@Bananafish I hate to break it to you but Python infact is C (at least the standard CPython which most people know as Python is). Java is C but with many libraries from CPP and it's syntax is also CPP syntax, not C (Java commonly uses things like "::" for name spaces which don't exist in C).Also per W3 spec HTML and XML are both "Document" models with many shared constraints so it's not a stretch to say HTML is XML (the same way that a rectangle is a square).
Admin
You're too young to remember but XHTML web sites were unusable if the web server sent the correct content type header because they were all tag soup... Unless the browser routinely ignored content type header, something that Internet Explorer absolutely did.
Admin
Honestly? It's a makeshift placeholder/reminder text. It's not i18n'd either. Just like the default alt text our CMS has, which is plainly on the edit page, very obviously wrong, and has at least twenty pages of google hits right now.
Admin
A square is a rectangle (quadrilateral with 4 equal angles of 90°) but a rectangle is not a square (a rhomboid rectangle with 4 equal angles of 90° and 4 equal sides, with a rhombus being a quadrilateral with 4 equal sides). That said ...
According to Google's AI: "Python is a versatile, high-level, general-purpose programming language known for its readability and ease of use, often used in web development, data analysis, and automation" and "Java is a widely used, general-purpose, object-oriented programming language and software platform, known for its 'write once, run anywhere' capability, meaning compiled Java code can run on any platform with a Java Virtual Machine (JVM)", where both have C-like syntax. Neither of these languages are C; you cannot compile C code with a Java compiler, and no Python interpreter will run C code. Because they are not C.
But this is about HTML, which is a markup language with a document model. XML and SGML are also markup languages with document models. PostScript is also a document model, but it is not a markup language; it's a page description language.
ManSplain version: None of these things is the other. Each has a particular strength that makes it the "correct" solution to a programming situation. If they were all the same, we wouldn't have all these things available for us to use.
Admin
@Bananafish my bad for getting the square and rectangle the wrong way around but for C in Python, look up Cython. Also many a jit compilers (numba being the most famous one) allow you to inspect the LLVM IR and ASM generated for "compiling" Python code to C which is still runnable in Python. There is also the ctypes package, etc. etc. All of that to say: don't trust garbage spat out by an AI. Running C in Python is perfectly valid and supported. Official docs for C/CPP extensions: https://docs.python.org/3/extending/extending.html
Admin
It's an italics tag, it's never been an image tag
Edit Admin
I don't believe he was referring to the
<i>
tag but assuming that whatever element that has anid
attribute ofimage_sample
is an<img>
tag whose inner HTML is being set. Believe me, I've seen even worse misuses for the latter element.