Categories
Html5

HTML5 Form Validation Examples

For an old days we used JavaScript validation to validate any form in a website and this was until recently unthinkable. But as soon as the HTML5 came then the validation becomes very easy to maintain in any form. Here is some example of HTML5 Form Validation: The ‘required’ attributeThis simply checks whether the value […]

Categories
Html Html5

Best place to include script tags in HTML

While embedding JavaScript in an HTML and putting the script tags i.e. included in JavaScript, where is the best place? Let’s see what happens when browser loads a website: First it fetch the HTML. Starts persing the HTML. Encounters a <script> tag referencing an external script file. Browser requests the script file. Script is downloaded […]

Categories
Html Html5

Difference between section and div in HTML

The section tag defines sections in a document like chapters, headers, footers whereas div tag defines a division in an HTML document. Here we will discuss the difference between section and div in HTML. In HTML, <section> means that the content inside is grouped and should appear as a entry in an outline of a […]

Categories
Html

Embedding PDFs without JavaScript

Without JavaScript, a PDF can be embedded into HTML pages. Embedding PDFs without JavaScript is a major part in HTML. In below there are 4 examples that describes how to use this common techniques. For embedding a PDF file into a HTML document, this is an open-source standards-friendly JavaScript utility. We need to know that […]

Categories
Html

Redirect from an HTML page

Redirect HTML page is done using the meta refresh for fallback purposes in the head section of a HTML i.e. replace old page with the URL of the page you need to redirect to. This is  the simplest way to Redirect HTML page i.e. one URL to another URL with the Meta Refresh tag. We […]

Categories
Html5

Make a placeholder for a “select” box

We all know that for a text input, the placeholders are working fine. But what about if we use a placeholder for a select box as well? Let’s see. Sometimes we need to use placeholder for a selectbox and making grey color is also remarkable. Suppose, we have a following html for a selectbox: <select> […]

Categories
Html

Valid values for id attribute in HTML

While creating the id attributes for HTML elements, we need to provide Valid values for id attribute. Let’s see what are they. ID and NAME value must contain with a letter (A-Za-z) and this may be followed by any number of letters, digits (0-9), underscores (“_”), hyphens (“-“), periods (“.”) and colons (“:”). In HTML […]

Categories
Html5

Store objects in HTML5 localStorage

The localStorage property allows you to store objects in HTML5 that is more secure and can store large amounts of data locally. It’s essential sometimes having stored JavaScript object in HTML5 localStorage. But objects don’t seem to work? Let’s see. Basically, if you have a look for Apple, Mozilla and Microsoft documentation, you can find […]