As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
A friend of mine just pointed out an interesting phenomenon... I went to the Google home page and looked at the source code:
<!doctype html><html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Google</title>
...
...
...
A LOT OF STUFF HERE
...
...
...
</script>
... so I noticed that source code doesn't have the closing </body> and </html> tags. Using Chrome's Inspector, it shows the closing tags but when I right click and look at the source, its not there.
What is going on here? Am I missing something? I tried using the W3C HTML Validator and it showed a bunch of errors...
http://validator.w3.org/check?verbose=1&uri=http://www.google.com/
So... what's the deal?
Google has a semi-official answer as a youtube video.
Basically when considering they're handling hundreds of millions of requests, they try to minimise the number of bytes sent per request. It's a tradeoff between validation, size and compatibility with different browsers used across the web.
No real-world browser actually rejects invalid HTML. Google is more concerned about supporting lots of different browsers, and optimising their home page down to the byte level. Whether they are right to be so pedantic about optimisation, I don't know, but they sure do serve a lot of pages.
See some answers here
Is it necessary to write HEAD, BODY and HTML tags?
W3C Validation says it's valid. From html 4.
Also In HTML5, there are no "required" or "optional" elements exactly, as HTML5 syntax is more loosely defined.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am a relatively new web apps programmer.
I have done differents web apps when HTML 5 were becoming (let's say) the new HTML standard.
So I want to know whether it is a good idea to migrate some of those apps to HTML 5.
By the way, I never have used HTML 5 in any web application.
What things do I have to keep in mind before do a migration or starts new web applications?
I mean: browsers, frameworks, javascript libraries, etc.
Thanks in advance!
In my opinion the best way to enter in the world of HTML5 is using solid libs/frameworks that ensure your code degrade gracefully on older browsers.
One cool site to grab some tricks and hints is the HTML5 Rocks.
I'm a experienced GWT developer (and I recommned it to Java developers), but I think that "the next big thing" may come from Dart.
In the Javascript world, nothing beats the jQuery lib. Of course, in my opinion =)
HTML5 is fully backwards compatible with previous versions of HTML. A few things are deprecated or obsolete, but browsers will still accept them until you can change them to something more up-to-date.
To start using HTML5, just replace your doctype with <!DOCTYPE html>
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I designed a web page using my own css. I ran them on Google Chrome and Firefox. Web pages looked like same and no problem. But in IE, all pages are very ugly. I have used many css styles which do much more. But those css s don't work in IE. If I use basic css,then I ll have to use more images and do more things to get the same look( I want to save time to work with functions in client side and server, and don't like to spend time designing). also If other available css frameworks are used (jQuery), then useless styles and images will be loaded which can cause to slow the web page loading. I used css reset style sheet.but it didn't solve my issue.
I want to make my pages nice in IE as in Chrome and FF and do less with css.And not to use more css frameworks? What Can I do for this?
Should I have to do all css works again which works for IE (spending time..:( )?
Edit: I looked into sources of many web site which are in my web site's type. They also have used basic css and used many images for a better look. but I want to focus on functioning and deslike to spend time editing images and dor much more with desigining.
You can use a tool called pie.htc which allows you to use css3 properties in IE.
It dosent fix everything but surely helps, and all you need to do is a simple CSS property.
Learn more here :
http://css3pie.com/
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am asking this question from the stand point of a web developer. I found out from this site that a "reset" button on a form page is mostly redundant. I would like to know whether it is the same for a "go back to previous page" link since all browsers have a back button.
<a href='previous-page'>Back</a>
Thanks.
Such a thing is rarely seen except on old sites where you navigate through a series of forms. The link on the page would avoid form resubmission. Usually there would also be some explanation of why you are supposed to click the link instead of the built-in button.
Current best practices obviate the need and it would now be an anachronism.
Some sites have static links labeled "back" and leading to the homepage or other index page. That's just a case of mislabeling, or extreme shortsightedness.
It may or may not be redundant, depends on the page. It's possible that your site is organized in a way you do a couple redirects; so back button will work not as most users expect. I don't say it's a good practice, but I saw quite a few sites doing such things.
If your page is in a wizard like. Most of the time, you'll see a back link, in such case some action can be executed before viewing the previous page.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I really would like to get into HTML 5 way.
As a title implies, I am looking for web sites that could serve as an example of HTML 5 usage. I am not talking about some kind tutorials. I am also not interested in shiny things like canvas, video, workers, geolocation ect, yes they are important and nice, but I would really like to become from the roots.
What I am looking for are the cases of, not only correct, but beautiful and self descriptive usage of markup (html elements, new and old, sectioning examples, new form features, microformats). So I could Ctrl + U them (view the source) and learn from them. As there a lot of not really well written websites, and from the other side, most of them are XHTML served as text/html, I found this a not so easy task. That is the reasoning behind that question.
Will be really grateful for all good links.
http://html5gallery.com/
check out http://www.html5rocks.com/
My favorite link for some awesome examples of HTML5 usage is at http://www.chromeexperiments.com/
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I have completed designing the template in photoshop. now i want to convert it into html although i am very well aware of all the html, css javascript elements i use firebug too , i have converted many templates till date. my codes does not comprise of the quality it needs. when i download any templates from some premium sites and look onto their codes i feel my code is very bad in shape, my codes crave for improvement. i want to master the proper use of div , ul and li elements, and the css.
is their any proper resource on the web that could teach me how i do it?
is it good if i use 960gs framework?
My Bible: A List Apart
Well, HTML5 Boilerplate provides a layout for quick coding of pages, although you'll need to go through it and pick out what you don't need.
Line25 has a lot of tips on coding sites, including a tutorial on converting from PSD to HTML, and Soh Tanaka's site also has a lot of tutorials.
Such resources as bestpsdtohtml.com can be useful too
css-tricks is another great resource and has some free video content demonstrating converting a photoshop mock up into html and css.
I think this is the first of three showing the end to end process.