xhtml

Is there an XHTML 5 validator?

末鹿安然 提交于 2019-12-04 10:50:54
Is there a validator specifically for XHTML 5, i.e. the XML serialization of HTML 5? The W3C validator supports the document types: HTML 5 (experimental) : which treats as valid various features that are not allowed in XML, such as implicitly closed <br> tags. several XHTML 1.0 and XHTML 1.1 doctypes, which don't recognize the new tags in HTML 5. Russ Clarke You can use Validator.nu (X)HTML5 Validator (Living Validator): http://html5.validator.nu/ Note that the "living validator" means that since the HTML 5 spec itself is constantly evolving, so does the validator - the results of your

div's height like remaining height

天涯浪子 提交于 2019-12-04 10:46:46
i have two div <div id="uno"> text </div> <div id="due"> text </div> div#uno{ width:300px; height: 100px; border: 1px solid blue; overflow:hidden; } div#due{ width:300px; height: 200px; border: 1px solid yellow; overflow:scroll; } how can i have the height of the div id="due" equal to the remaining height of the page? Make sure you have a HTML 4.01 or XHTML 1.x or later doctype specified: div#uno{ position:absolute; width:300px; height:100px; top:0px; border:1px solid blue; overflow:hidden; } div#due{ position:absolute; width:300px; top:100px; bottom:0px; border:1px solid yellow; overflow

subscript and superscript for the same element

谁说我不能喝 提交于 2019-12-04 10:24:46
问题 Is there any way to add both subscript and and superscript to the same element? If I do Sample Text<sub>Sub</sub><sup>Sup</sup> the superscript appears after the subscript. One I idea I had is to do something like: <table> <tr> <td rowspan='2' valign='center'>Sample Text</td> <td>Sup</td> </tr> <tr> <td>Sub</td> </tr> </table> It seems to do the job but is quite ugly. Any better ideas? Thanks! 回答1: I'm no CSS guru but you could try something along the lines of http://jsfiddle.net/TKxv8/1/

What is the best method to code physical address in html?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 09:08:00
What is the best method to code physical address in html ? in Semantic, Accessible and SEO way Use a Microformats vCard <div class="vcard"> <span class="fn">Gregory Peck</span> <a class="org url" href="http://www.commerce.net/">CommerceNet</a> <div class="adr"> <span class="type">Work</span>: <div class="street-address">169 University Avenue</div> <span class="locality">Palo Alto</span>, <abbr class="region" title="California">CA</abbr> <span class="postal-code">94301</span> <div class="country-name">USA</div> </div> <div class="tel"> <span class="type">Work</span> +1-650-289-4040 </div> <div

Configure Rails to output HTML output instead of XHTML

岁酱吖の 提交于 2019-12-04 08:38:43
问题 How do I configure Ruby on Rails to output standard HTML code instead of XHTML when using helpers (form, javascript, css, etc.)? I don't want to have the slash at the end: <input name="email" type="text" /> 回答1: This answer is contained in the link provided by MarkusQ, but I figured I could spell it out exactly. You have to modify the code than renders all tags, you can do that by including the following code into something like lib/dont_use_xhtml.rb module ActionView::Helpers::TagHelper

Browser Rendering Difference Between strict/transitional DOCTYPEs

浪尽此生 提交于 2019-12-04 08:37:30
I came across an 'issue' some time ago that I never did get to the bottom of. Hopefully somebody can shine a light on it. What causes certain browsers (Chrome, Opera and Safari) to render a page differently when I change the DOCTYPE from strict to transitional. I know the general cause of this is quirks mode being triggered, but both the XHTML and CSS for both files validate according to the w3c validator. I can only assume that these browsers use different internal style sheets for the two DOCTYPEs, but have no real idea why they would do so. I was just hoping somebody could confirm why this

Having stylesheet <link> in <body>?

纵然是瞬间 提交于 2019-12-04 08:10:14
Is it a bad idea to link CSS files inside the body ? I've read that the browser is forced to start CSS rendering over again if it finds another CSS file outside of head , just because it might need to apply styles to elements it's already rendered. Also I don't think the HTML will validate properly (I need to confirm this). Are there any other reasons? The only reason I've seen people use to justify doing this is when they're using certain templating engines, and they can't arbitrarily change the stylesheets linked in the head when loading new content or a particular view (in the case of MVC

How do I align a div at the bottom right corner of a web page even if the content is less?

时光总嘲笑我的痴心妄想 提交于 2019-12-04 07:55:40
I have this extremely simple splash page here: http://iph0wnz.com It has the main graphic in the middle, followed by my 'a.' logo at the bottom right. I want that logo to be aligned to the bottom right hand of the entire page , which means that if there is a lot of text content in the page, it appears after all that (i.e. it doesn't hover on top), but if there is less content -- like right now -- then it should get aligned to the very bottom of the screen, and not right after the content. I'll try to give a textual example like I saw in How to align content of a div to the bottom? : ----------

What is the biggest cons to use position: absolute & top/left over Float & margin+padding, If site is fixed width (970px), centered?

◇◆丶佛笑我妖孽 提交于 2019-12-04 07:34:08
What is the biggest disadvantage to use CSS positioning( From Dreamweaver AP Div ) for everything instead Float for fixed width, centered website? if I don't care for Mobile users Small screen users (smaller than 1024 px screen size) But I care for Screen reader user All browser user (including IE6) If you don't care about small resolution, it's just a question of flexibility : when you use absolute positionning, you break the flow. So, everything must be exactly sized. For many elements or situations (make a perfect image title...), it's the best (and sometimes unique) choice. Most of time,

How can I get the index of this element with jQuery?

柔情痞子 提交于 2019-12-04 07:30:23
I am trying to get the index of an element using jQuery to send to a PHP script. Here is my XHTML <form action="/accreditation/questions/" method="post" id="questions-form"> <fieldset id="question-0"> <legend>Question</legend> <h3>What colour is grass?</h3> <ul> <li> <input type="radio" name="answer[0]" value="0" id="radio-0-0" /> <label for="radio-0-0">Green</label> </li> <li> <input type="radio" name="answer[0]" value="1" id="radio-0-1" /> <label for="radio-0-1">Red</label> </li> <li> <input type="radio" name="answer[0]" value="2" id="radio-0-2" /> <label for="radio-0-2">Orange</label> </li>