This might seem trivial for a short document with one headline a single paragraph, but it can get complicated very fast. Things like:. You also need to be able to identify sections of your document and provide metadata about the document itself. Metadata is information about the document, such as the title, author, relevant keywords, and relationship to other documents.
HTML has been around for a long time. And actually, the concept of hypertext goes back even further than that. The concept first appeared in the early s, and was named and demonstrated in the s. This became the first version of what we now call HTML. Since then, the language has been in constant development. The language has evolved over all this time because web development has changed.
We do things with web pages and HTML today that were never dreamt of by the early developers and implementers of the language. A web page is no longer just a document; it is likely to be a full-scale web application. The purpose of the profound changes to the language was to standardize the many new ways in which developers were using it, as well as to encourage a single set of best practices with regards to web development.
Most of the individual changes are a result of larger objectives in the design of the language. These objectives primarily include:. If you want to get an intuitive sense of HTML5, it is best to understand how these objectives affected the development of the language. Semantic markup means markup which has meaning , rather than markup which simply looks a certain way. That semantic meaning would be lost if we just made the text bold and large without using the appropriate tag.
HTML has always had a little bit of semantic markup available to it: heading tags , the link rel attribute , and document metadata. In HTML, there are a host of new semantic elements intended to indicate the basic structure of a page:. These help search engines and other services to easily find information on a page, for display in other contexts. At the same time, existing inline elements which produce various effects like bold , italic , and underline have been refined or redefined to imply specific semantic meaning.
Along with strongly encouraging semantic meaningful markup, the HTML5 specification strongly discourages non-meaningful markup — markup intended only to tell the browser how to display things. This includes things like:. Most of the HTML features that allowed for these sorts of things have been completely deprecated. Using a strict doctype will help you with that, since the validator will alert you of any presentational elements or attributes that have sneaked its way into your code.
I stated earlier that the doctype needs to be the very first thing in your HTML documents. Well, that is in fact a slightly simplified version of the truth. There is also the XML declaration to consider. This is called an XML Declaration, and when it is present it needs to be inserted before the doctype. Internet Explorer version 6 has a problem with that—this causes it to switch into Quirks mode, and as I explained earlier you most likely do not want that.
The probability of all that happening all at once is quite slim, so the easiest way to solve the Internet Explorer problem is to simply omit the XML declaration.
Always include one of the doctypes mentioned here as the very first thing in all of your HTML documents. It will make sure that validators know what version of HTML you are using, so they can correctly report any mistakes you have made.
It will also make sure that all recent web browsers use their Standards mode, which will give you more consistent results when you are styling the document with CSS.
Jump to: navigation , search. Just use HTML5, there's no reason not to. Why not make this an answer? Are some relevant facts missing? I voted to close because it's not clear what your specific concerns are.
Are you asking about a particular feature or if a certain browser supports it? That's easily found by a Google search or at caniuse. If you want to play it safe i. Show 4 more comments. Active Oldest Votes. Improve this answer. AlphaMale AlphaMale Add a comment.
Lion King Lion King Ayman Safadi Ayman Safadi Vinayak Garg 6, 10 10 gold badges 51 51 silver badges 78 78 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
0コメント