Tuesday, 14 February 2017

Main tag HTML 5

Main tag HTML 5 example


The main tag specifies the main content of a document. The main element represents the main content of the body of a document or application. The main content area consists of content that is directly related to or expands upon the central topic of a document or central functionality of an application. The content inside the <main> element should be unique to the document. It should not contain any content that is repeated across documents such as sidebars, navigation links, copyright information, site logos, and search forms.

The main tag is better for SEO point of because search can better understand with the help main container text that what is exactly particular page is stand for.


<!DOCTYPE html>
<html>
<body>

Figure Tag HTML 5


Figure  Tag HTML 5 Example

HTML 5 introduce figure tag for apply image on your webpage. You may think that what about img tag? Yes it still in use but there was a problem with img tag, when you want to apply some caption to related image then you will add some HTML tag but if you are using figure tag then you have figure caption tag for display caption. Figure tag is container of graphics element which is use in conjunction of img and figure caption tag. So figure has better description processing option.

There are some exceptions. Graphics that are just graphics should still be listed as <img>. The reason regular graphics deserve different treatment is because they’re not necessary to the content on the page. If someone can’t see the graphic, they’d still get a clear message from your site.

<figure>

Dialog Tag HTML 5

Dialog Tag HTML 5 Example

The HTML <dialog> element represents a dialog box or window. It makes it easy to create popup dialogs and modals on a web page. The <dialog> element accepts a boolean attribute called open that sets the element to "active" and allows users to interact with it.

<html>
<body>

Details Tag HTML 5

Details Tag HTML 5

Detail tag is use to show some detail information about something which you want display in such manner when user can show and details. Like in copyright information in example only copyright small message is displaying and if user wants show detail then he needs to click on arrow symbol.

Note: The details tag is not supported in Internet Explorer.

<html>
<body>