xhtml

Why don't self-closing script tags work?

What is the reason browsers do not correctly recognize: <script src="foobar.js" /> // self-closing script tag Only this is recognized: <script src="foobar.js"></script> Is it breaking concept of XHTML support? Note: This statement is correct at least for all IE(6-8 beta 2). ...

div class vs id

When using divs when is it best to use a class vs id? Is it best to use class, on say font variant or elements within the html? Then use id for the structure/containers? This is something I've always been a little uncertain on, any help would be great. ...

What are the best practices for using html with xml based languages like svg?

From browsing on this site and elsewhere, I've learned that serving websites as xhtml at present is considered harmful. Delivering xhtml and serving it as application/xhtml+xml isn't supported by the majority of people browsing at present, delivering xhtml as text/html is at best a placebo for myself, and at worst a recipe for breaking ...

What are all the valid self-closing tags in XHTML (as implemented by the major browsers)?

What are all the valid self-closing tags (e.g. <br/>) in XHTML (as implemented by the major browsers)? I know that XHTML technically allows any tag to be self-closed, but I'm looking for a list of those tags supported by all major browsers. See http://dusan.fora.si/blog/self-closing-tags for examples of some problems caused by self-clo...

Is XHTML compliance pointless?

I'm building a site right now, so far I've painfully forced everything to be compliant and it looks pretty much the same across browsers. However, I'm starting to implement some third party/free javascripts which do things like add attributes (eg. order=2). I could work around this but it's a pain, and I'm starting to lose my principals ...

How do I pop up an image in a separate div on the mouseover of a div using only CSS?

I have a small gallery of thumbnails. When I place my mouse pointer over a thumbnail image I'd like to have a full size image pop up in a div in the top right of the screen. I've seen this done using just CSS and I'd like to go down that route rather than use javascript if possible. ...

What browser is best for testing web standards?

When I build a site, I'd like to have at least one browser I can show it off in without any hacks or workarounds, and yet still retain maximum functionality. Knowing that none of the browsers have perfect standards adherence, which one comes closest? Also, are there any standards areas in which a single browser seems to specialize? Oper...

What is semantic markup, and why would I want to use that?

Like it says. ...

Is it worth the development time to output valid HTML?

Developing websites are time-consuming. To improve productivity, I would code a prototype to show to our clients. I don't worry about making the prototype comform to the standard. Most of the time, our clients would approve the prototype and give an unreasonable deadline. I usually end up using the prototype in production (hey, the proto...

What's the best way to remove <br> tags from the end of a string?

The .NET web system I'm working on allows the end user to input HTML formatted text in some situations. In some of those places, we want to leave all the tags, but strip off any trailing break tags (but leave any breaks inside the body of the text.) What's the best way to do this? (I can think of ways to do this, but I'm sure they're ...

How would you easily validate a JSP option pick list?

I need to validate this simple pick list: <select name="<%= key %>"> <option value="ETC" SELECTED>Select an option...</option> <option value="ONE">Lorem ipsum</option> <option value="TWO">dolor sit amet</option> </select> So the user would never submit the form with the, excuse the repetition, "Select an option..." option ...

How to convert HTML to XHTML?

I need to convert HTML documents into valid XML, preferably XHTML. What's the best way to do this? Does anybody know a toolkit/library/sample/...whatever that helps me to get that task done? To be a bit more clear here, my application has to do the conversion automatically at runtime. I don't look for a tool that helps me to move some p...

DIV with overflow:auto and a 100% wide table problem

I hope someone might be able to help me here. I've tried to simplify my example as best I can. I have an absolutely positioned DIV, which for this example I've made fill the browser window. This div has the overflow:auto attribute to provide scroll bars when the content is too big for the DIV to display. Within the DIV I have a table t...

What's the future of the web? XHTML 2, HTML 5, or something else?

I'm confused by the discussion and advancement both of a new version of HTML and a new version of XHTML. Are they competitors? If so, what is likeliest to be the adopted future of the web? If not, what is the differing non-competing purpose for each? Are we due to have a BluRay/HDVD battle here? Is there ultimately any clear decision? I...

Hiding table rows without resizing overall width...

Is there a way to hide table rows without affecting the overall table width? I've got some javascript that shows/hides some table rows, but when the rows are set to "display: none;" the table with shringk to fit the contents of the visible rows. ...

Loading XHTML fragments over AJAX with jQuery

I'm trying to load fragments of XHTML markup using jQuery's $.fn.load function, but it raises an error trying to add the new markup into the DOM. I've narrowed this down to the XML declaration (<?xml...?>) -- the view works if I return static text without the declaration. I don't understand why this would cause failure, or if the blame l...

What is the best XSLT engine for Perl?

I would like to know what of the many XSLT engines out there works well with Perl. I will use Apache (2.0) and Perl, and I want to obtain PDFs and XHTMLs. I'm new to this kind of projects so any comment or suggestion will be welcome. Thanks. Doing a simple search on Google I found a lot and I suppose that there are to many more. ...

Conditionally set an attribute on an element with JSP Documents (JSPX)

In HTML forms, buttons can be disabled by defining the "disabled" attribute on them, with any value: <button name="btn1" disabled="disabled">Hello</button> If a button is to be enabled, the attribute should not exist as there is no defined value that the disabled attribute can be set to that would leave the button enabled. This is ca...

What is the consensus on "Voice-family" Hacks?

I just started working for a pretty large company and my group manages all of their public facing websites. I opened the style sheet for the first time today and have seen over 20 instances of the designers using the voice-family hack to fix an IE bug. (I don't know why they allow graphic designers to write any kind of markup at all) W...

what is the best xhtml-css editor with emmbeded browser (under GPL) in your opinion?

what is the best xhtml-css editor with emmbeded browser (under GPL) in your opinion? note: must be work under linux os. ...