Html or xhtml which is better




















They create designs to give the look to a web. Whereas the developer builds the backend of the web. A Developer needs to work on the functionality of the website and designer needs to give it an interactive and user-friendly design. Don't have an account?

Sign Up. Already have an account? HTML 5 Tutorials. Related Tutorials jQuery. HTML 5. View More. Aman Goel. Table of Contents. Markup Languages: What Are They?

Front-End Development Web Development html5 html xhtml. Leave a comment. Submit Cancel. Toby Wood. Robin Strickland.

Spencer Spencer. Douglas Woods. Eliot Trevino. Jordan Little. Mayson Hampton. Alfred Daniels. Frederick Harrison. Stuart Rice. Geneva Payne. Kornel Daniel Roseman Daniel Roseman k 57 57 gold badges silver badges bronze badges.

This is hardly a point There are plenty of work-arounds in place, just as there are plenty for huge numbers of the web's emerging technologies heck, even PNGs with transparency still need a work-around in IE. Bayard Randel Bayard Randel 9, 2 2 gold badges 39 39 silver badges 46 46 bronze badges. Can't help but agree that HTML5 does seem to be a very promising standard. Still, not closing tags makes me feel dirty.

I prefer this myself too see update on post for citation. Peter Mortensen 29k 21 21 gold badges 97 97 silver badges bronze badges. Browsers don't have to accept improperly nested tags your example is invalid HTML , but they do - since authors use them, and throwing errors at users instead of rendering the page is unhelpful. Antony Carthy Antony Carthy 5, 9 9 gold badges 32 32 silver badges 38 38 bronze badges. HTML has pretty strict syntactic and semantic rules.

They're just not the same as for XML. You may want to read the spec : — Joey. HTML4 has. HTML5 has rules or at least, there are many people who want it to have how to correct mistakes, i. And the problem with HTML4 is that Browsers already correct mistakes, rendering the "strict syntax" a joke. I know the spec of HTML 4. Most people don't realise that HTML 4. Also, I never said it doesn't have rules, just that it has fewer. Please revise the -1, as this argument is more about using standards than the fact that there is a standard for html tell that to IE6.

You say HTML is ugly Show 4 more comments. HTML elements by also be properly nested. Sometimes start or end tags are optional or forbidden though. HTML documents must have one root element. The question wasn't about the differences, I suppose the poster knows them Pierre Pierre I wouldn't say allows, but makes it easier.

Alec Alec 8, 8 8 gold badges 37 37 silver badges 42 42 bronze badges. XHTML forces you to be neat. Steve Harrison Steve Harrison k 15 15 gold badges 83 83 silver badges 71 71 bronze badges. I think it does make sense that the img tag never gets closed. It is perfectly logical - so long as you don't treat it in isolation. There is no reason for an img element to have content, so the DTD says that it can't have content.

The result is that the end tag is forbidden. This results is smaller markup. It is less intuitive, but easier to write once you have learned the rules. But indeed enforcing the rules might be easier for the developer. PhiLho: 1 Thanks, I'll look into that. Show 3 more comments. Wesley Wesley You're right.

Marnix van Valen Marnix van Valen Heck, using nonsenseML with a crazy made-up Doctype will do that too. OregonGhost OregonGhost Actually, that is just wrong. Browsers will through an error on "non-well-formed data", and then just stop parsing. As per the spec. They don't continue to try and parse it. Go on, try it. Get a random HTML document. Open in Firefox. You may also look at the following articles to learn more —. Submit Next Question. By signing up, you agree to our Terms of Use and Privacy Policy.

Forgot Password? This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy. Popular Course in this category. Course Price View Course. Free Software Development Course. Login details for this Free course will be emailed to you.

Email ID. Despite being built for the same functions at a base level, there exist some key differences between the two. Let us go through these key differences before diving off the deep end. First off, HTML had a lot of errors that needed to be corrected when it came to incomplete rendering of content between browsers. Other than these, there are a lot of other more subtle differences in documentation and syntaxes between the two which are not as prominent as these differences are. Based on what kind of purpose each of them serves, we can choose one of them and use it to perform our task.

Based on all that we have learnt so far, we can say that each of these can be used in different circumstances, leading to different outcomes. HTML would be easy to learn for beginners.

If the user wants a more structured and stricter version of content on a web page, XHTML is the right choice, but, if the user wants a more flexible and lenient solution, HTML is the one to go with. In reality, both sides have their own version of pros and cons. Choosing one over the other would be unfair and difficult as each one of them have their own uses. But, if one had to choose between them, breaking down your needs and comparing them with the features the languages offer, can simplify your decision by a lot.

Either way, having a good grasp over both of them can take you a long way in current times, with constantly changing technology. All of it depends on personal needs and alignment of features offered by the two of them.



0コメント

  • 1000 / 1000