In this article, we will see the various tags that are migrated from HTML4 to HTML5, along with knowing their alternative tags introduced in HTML5 with their descriptions & implementation. There are several tags that are no longer supported in HTML5, instead of that, it has brought new tags in the alternate of those tags. For instance, in order to add a heading with bold text, at the starting of the paragraph, we need to declare the div containing the id with header & correspondingly declare the required CSS properties to make the heading. Now, the same task can be accomplished using the tag, which makes the overall task simple & easy. There are many more such kinds of tags, which are described below:
HTML4
HTML5
Sự miêu tả
The tag in HTML is used to define the header for a document or a section as it contains the information related to the title and heading of the related content.
The tag is used for declaring the navigational section in HTML documents.
The tag in HTML is used to define a footer of HTML document
The
The
Có một số tính năng của HTML5 hơn HTML4
- The few old HTML tags have been removed in HTML5, such as , , ,, and tags
- HTML5 comes with some new tags, like
and , that can be used to design the main body of the webpage & to add the basic page details at the end of the page, that make the webpage more readable for search engines. It is optional to use & depends on the usage to design the specific page. - A few attributes have been deprecated, which are now accomplished by using CSS properties. For instance, in HTML4, we generally use the width or height, or color attributes with the tag in the HTML code. Now in HTML5, we can replace them with styling properties by specifying the width, height & color property with their values, which will work the same with the same output.
- HTML5 has , for adding the media into the webpage & also supports the tags as well as integration of SVG content. These tags or elements make the overall work easy along with dealing with multimedia and graphical content on the web without using third-party plugins.
Vui lòng tham khảo bài viết Top 10 tính năng mới của HTML5 để biết thêm chi tiết về các tính năng này. Chúng ta sẽ hiểu sự khác biệt của chúng thông qua các ví dụ mã
Ví dụ. Ví dụ này mô tả việc triển khai các thẻ mới trong HTML5
HTML