xhtml

why is <br /> different from <br></br> in XHTML?

馋奶兔 提交于 2019-12-05 13:23:07
Here's the complete source of an HTML page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head></head> <body> one<br> two<br /> three<br></br> four </body> </html> Can anyone explain why an extra blank line appears between the "three" and the "four" when I view the page in IE8 or chrome? I thought standards were supposed to make all browsers look the same and as far as I can see this page conforms to the XHTML transitional standard Because the XHTML spec HTML Compatability Guidelines specify that br must should

HTML page to XHTML with TagSoup

懵懂的女人 提交于 2019-12-05 12:48:26
Sorry if this is too simple, but I simply couldn't find a tutorial nor the documentation of the Java version of TagSoup. Basically I want to download an HTML webpage from the internet and turn it into XHTML, contained in a string. How can I do this with TagSoup? Thanks! Something like this: wget -O - example.com/bad.html | java -jar tagsoup.jar Or, from Java: To parse HTML: Create an instance of org.ccil.cowan.tagsoup.Parser Provide your own SAX2 ContentHandler Provide an InputSource referring to the HTML And parse() ! Below is the code which should provide you with a means to pull down a web

Will deprecated elements be removed from future browsers?

淺唱寂寞╮ 提交于 2019-12-05 12:20:40
What are cons to using deprecated elements if I don't care about validation and I use that DTD which supports them? Will deprecated elements will not be rendered by future browsers? Some online WYSIWYG editors (which we use in CMS) still give output in deprecated elements. Must I invest the time to change the output for a client? alt text http://easycaptures.com/fs/uploaded/241/3445655293.jpg Should we avoid deprecated elements at any cost? Currently all mainstream browsers show all deprecated elements. I just wanted to know the disadvantages of using deprecated elements to give to a non

Is it necessary to use H2 after h1

情到浓时终转凉″ 提交于 2019-12-05 12:12:56
Is it mandatory to use H2 after h1 if text is too small then can we use h4 after h1 . and is it accessible ? Toon Krijthe Technically you can use any combination of those. Semantically, it's wise to use the common order. And if the font size is too small, use CSS to change that. With the tags h1 - h6 you give a semantic meaning to a title. Where h1 is for the top level, h2 for a subdivision of h1 , h3 for a subdivision of h2 etc. You can change the appearance by setting CSS rules, which is great because now you can separate content from layout. You should always structure the document

Get HTML page <input> values and names using regex on PHP

百般思念 提交于 2019-12-05 11:14:34
Ok, so as the title says, I have an HTML page that I fetch using libcurl (cURL inside PHP). That page has one <form> that I need to extract the <input> names and values, and I would like to do that using Regex. I'm making it using Regex because I think that's the easier way. If you think I shouldn't use regex, but something like xpath, say how. I don't know if you can understand what I'm trying to say, so feel free to ask. Here's the PHP code (complete): <?php /***** DISABLED BY NETWORK TRAFFIC REASONS... USING LOCAL CACHE $curl = curl_init(); $url = 'https://secure.optimus.pt/Particulares

Uploading files using HTML file input on iphone

混江龙づ霸主 提交于 2019-12-05 10:56:21
问题 I am creating a web form for uploading small movie clips to a HTTP server. However, while my HTML file input control gets shown on an ipod touch, the button is completely disabled and I cannot click it to upload files. What do I have to do to use the input control to upload files (e.g. movie clips or pictures) to my HTTP server. My page is XHTML MP 1.2 compliant. 回答1: IOS6 now allows it: http://agileleague.com/blog/hidden-gem-of-ios6-file-uploads-in-mobile-safari/ I tested and it works.

<br> instead of <br/> in Visual Studio

荒凉一梦 提交于 2019-12-05 10:42:05
I use Visual Studio for teaching HTML. We use HTML 4.01 Transitional. Visual Studio defaults to XHTML 1.0, and I need to solve one problem with a typical difference among these two HTML standards: Whenever we enter <br> or <hr> , it is automagically changed to <br /> or <hr /> respectively. This is great for XHTML, but unwanted when working in HTML 4.01 mode. So how to turn off this automagical feature? We use mainly Visual Studio 2010, and sometimes also 2012 and 2008. (I know how to easily switch validation to HTMl 4.01 mode, but it still puts slashes to each <br> , <hr> etc.) Tools ->

Reusing the same page multiple times

巧了我就是萌 提交于 2019-12-05 10:38:04
Is it possible to reuse one page multiple times attached to different objects? I have a page were you can input personal information (name, address, social number, ...) connect to one bean: prospect. In some occasions I must gather linked personal information. example for credit scoring (a person and a guarantor). So I wanted to use with 2 includes. But how can I make sure include1 holds the information for person1 and include2 holds the information for person2? <rich:tabPanel id="creditScoreTab" switchType="client" > <rich:tab id="mainContractor" > <ui:include src="includes/prospect.xhtml" />

Is it necessary to add cellspacing=“0” cellpadding=“0” in <table>?

こ雲淡風輕ζ 提交于 2019-12-05 09:58:38
问题 Eric meyer reset css is suggesting "tables still need 'cellspacing="0"' in the markup". Is it necessary? and what is the benefit of border-collapse: collapse ; and border-spacing: 0; ? and it's only suggesting to use cellspacing, while table has another property called cellpadding? /* tables still need 'cellspacing="0"' in the markup */ table { border-collapse: collapse; border-spacing: 0; } 回答1: cellpadding is not suggested because the padding css property sufficiently overrides the default

Making A Close Image Appear On Top Right Corner Of A DIV

巧了我就是萌 提交于 2019-12-05 09:05:43
I wanted to know how to make a small cross (close) image appear on the top right inside of a div. Using CSS and XHTML. Thanks stecb You could do it this way: jsfiddle.net/7JEAZ/1317 Code snippet: #panel{ width:100px; height:100px; background:red; } #close{ display:block; float:right; width:30px; height:29px; background:url(https://web.archive.org/web/20110126035650/http://digitalsbykobke.com/images/close.png) no-repeat center center; } <div id="panel"><a id="close" href="#"></a></div> In-case its any help, here is another example with the close button over the top right corner of the DIV, the