I reviewed a bunch of articles on the Internet and it seems to me to the end that I don’t understand what html5 and CSS3 are . I understand what html4 and css2 are - roughly speaking, a set of tags that was relevant a couple of years ago. So, what I do not understand, it seems like new tags were added to the html5 version. Those. html5 is it just extra tags? Because some tags have been removed, some added. For example, the same div
, span
. Are they now in html5 ? Often heard the expression, made in html5 . And how to understand is done on html4 or on html5 , if div
and span
? Is there a complete list of tags for html5 ? And I also heard somewhere that there has long been no separation of html5 , there is just html , it’s kind of like nonsense, sort of like a language alone. They used to say that in order to write on html5 , you need to register doctype html
. Although I honestly do not understand this, like browsers have long ignored the transitional doctype
.
- I read the standard more closely. As I understand the concept of css3 and does not exist. Hike someone came up with it to confuse people. There are separate modules without reference to the css number 1) CSS Color Level 3 2) CSS Namespaces 3) Selectors Level 3 4) Media Queries 5) CSS Style Attributes - Pavel Igorev
2 answers
HTML5, unfortunately, is applied in several meanings, so "reading a heap of articles" rather confused you more.
There is HTML version 5 as a markup language , a document written in this language must be labeled <!DOCTYPE html>
. Then the browser believes that it is necessary to use the appropriate standard for its interpretation. Yes, in practice, the standard can not be respected, but in this case, work in HTML5-compatible browsers is not guaranteed . (This is the essence of almost all standards: either you observe or do not count on it.)
You can not use any new HTML5 features compared to previous versions, but if the doctype is correct and the standard is met, then formally it is HTML5.
Often, HTML5 is used to mean “a set of technologies” , which was implemented in browsers only with the advent of HTML5. For example, the <canvas>
and the Canvas API made it possible to draw arbitrary point graphics, opening up new horizons for browser games; In order for this element to be used in HTML5 documents, the markup language must provide for this.
How to find out the version? Formally, by DOCTYPE
. Yes, the browser is often able to understand and wrong, but this is not guaranteed and this is not a reason to violate the standard. In fact, the site can not comply with any standard and still work.
If before HTML4 was just a markup language for web pages, HTML5, in addition, received more opportunities to create full-fledged Web applications.
The list of these new and not very features:
- Semantics: allows you to more accurately describe what your page is.
- Communication: new ways to communicate with the server.
- Offline and Storage: methods for storing information locally on the client side.
- Multimedia: creating and interacting with video and sound.
- 2D / 3D Graphics and effects.
- Access to devices: the use of different devices for input and output information.
- Stylization: the creation of sophisticated and perfect themes.
So one doctype and a pair of new html-tags is not limited. Read more here .