Showing posts with label Html. Show all posts
Showing posts with label Html. Show all posts

Sunday, 8 October 2023

HTML5 Features

 Top HTML5 Features are:

HTML stands for Hyper Text markup language, and HTML 5 is the 5th version of it. A lot of dynamic parameters were missing in the HTML for which we have to depend on third-party libraries, however, in the latest version of HTML it has become a lot easier for building a dynamic website.

Browser support for HTML5

All modern browsers, including Google Chrome, Mozilla Firefox, Opera Mini, Microsoft Edge, and Apple Safari, support HTML 5 in all of their features. Because HTML 5 capabilities are not adequately supported by earlier browser versions, developers must create alternative content to ensure cross-browser compatibility. 

below are the list of Top HTML5 Features, which are described in detail below:

  1. Semantic Elements
  2. Audio and Video Support
  3. Canvas Elements
  4. Geolocation API
  5. Local Storage
  6. Responsive Images
  7. Web Workers
  8. Drag and Drop API
  9. Form Enhancements
  10. Web Sockets
  11. Micro Data
  12. Cross Document Messaging
For details, visit website

Continue Reading →

Wednesday, 27 April 2016

Creating a Custom Tooltip

Creating a Custom Tooltip using Htm and CSS

      ToolTip on the Top

To create a tooltip on the top of a content you need to write the below styles and Html.

table{
margin:10%
}
table tr td{
padding-right:20px;
}
    a.tooltips {
        position: relative;
        display: inline;
    }

        a.tooltips span.tips {
            position: absolute;
             width: 125px;
            max-width: 200px;
            color: #FFFFFF;
            background: #000000;
            height: 20px;
            line-height: 20px;
            text-align: center;
            visibility: hidden;
            border-radius: 4px;
            font-size: 12px;
            font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
            margin-left: -45px !important;
        }

            a.tooltips span.tips:after {
                content: '';
                position: absolute;
                bottom: 100%;
                left: 55%;
                margin-left: -8px;
                width: 0;
                height: 0;
                top: 20px;
                border-top: 8px solid #000000;
                border-right: 8px solid transparent;
                border-left: 8px solid transparent;
            }

    a:hover.tooltips span.tips {
        visibility: visible;
        opacity: 0.8;
        top: -60px;
        left: 10%;
        margin-left: -76px;
        z-index: 999;
    }

Add the Html

<table>
<tr>
<td>
<a class="tooltips">
       <img src="https://www.google.co.in/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" height="50" width="90">
  <span class="tips">Tooltip on Top</span>
</a>
</td>
</tr>
</table>

Now Run your Html Page:

           ToolTip on the Bottom

To create a tooltip on the bottom of a content you need to write the below styles and Html.

     span.tooltips {
        position: relative;
        display: inline;
    }

        span.tooltips span {
            position: absolute;
          width: 125px;
            color: #FFFFFF;
            background: #000000;
            height: 20px;
            line-height: 20px;
            text-align: center;
            visibility: hidden;
            border-radius: 4px;
            font-size: 12px;
            font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
            margin-left: -45px !important;
            font-weight:normal !important;
        }

            span.tooltips span:after {
                content: '';
                position: absolute;
                bottom: 100%;
                left: 55%;
                margin-left: -8px;
                width: 0;
                height: 0;
                border-bottom: 8px solid #000000;
                border-right: 8px solid transparent;
                border-left: 8px solid transparent;
            }

    span:hover.tooltips span {
        visibility: visible;
        opacity: 0.8;
        top: 25px;
        left: 18%;
        margin-left: -76px;
        z-index: 999;
    }

  Add the Html

<table>
<tr>
<td>
<span class="tooltips" style="font-size: 13px;">
<img src="https://www.google.co.in/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" height="50" width="90">
  <span class="tips">Tooltip on Bottom</span>
 </span>
</td>
</tr>
</table>

Now Run your Html Page:



Click here to Download the Html File.


Continue Reading →

Wednesday, 6 April 2016

HTML5 Local and Session Storage

HTML5 Local Storage

Local Storage is a web storage feature that allows you to store key-value pairs in a web browser. It’s part of the Web Storage API and provides a way to persist data across sessions without an expiration date, meaning the data will remain until explicitly deleted.

Key Features of Local Storage:

  1. Capacity: Generally allows around 5-10 MB of data per origin.
  2. Synchronous API: Access to data is synchronous, meaning it can block the main thread, so it's best for smaller amounts of data.
  3. Data Type: Only stores strings. You can use JSON to store objects or arrays.
  4. Persistence: Data persists even after the browser is closed and reopened.
  5. Scope: Data is scoped to the origin (protocol, host, and port), so different domains cannot access each other’s Local Storage.

Common Methods:

  • localStorage.setItem(key, value): Stores a value with the specified key.
  • localStorage.getItem(key): Retrieves the value associated with the specified key.
  • localStorage.removeItem(key): Removes the specified key and its value.
  • localStorage.clear(): Removes all key-value pairs from Local Storage.

Example Usage:

// Storing data
localStorage.setItem('username', 'JohnDoe');

// Retrieving data
const username = localStorage.getItem('username');
console.log(username); // Outputs: JohnDoe

// Removing data
localStorage.removeItem('username');

// Clearing all data
localStorage.clear();

Use Cases:

  • Storing user preferences.
  • Caching data for offline access.
  • Managing user sessions.

Keep in mind that sensitive information should not be stored in Local Storage due to security concerns, as it's accessible via JavaScript.

                                                            HTML5 Session Storage

Session storage is a type of web storage that allows you to store data for the duration of a page session. This means that the data persists as long as the browser tab is open. Once the tab is closed, the data is cleared.

Here are some key points about session storage:

  1. Scope: Data is limited to the window or tab where it was created. Different tabs or windows will not share the same session storage.

  2. Storage Limit: Typically, session storage can hold around 5-10MB of data, though this can vary by browser.

  3. Data Types: You can only store data as strings. To store objects, you'll need to convert them to strings using JSON.stringify() and parse them back using JSON.parse().

  4. API: You can access session storage using the window.sessionStorage object. Common methods include:

    • setItem(key, value): Store a value by key.
    • getItem(key): Retrieve a value by key.
    • removeItem(key): Remove a specific item by key.
    • clear(): Clear all session storage data.
  5. Use Cases: It's commonly used for temporary data, such as user preferences, form inputs during a session, or any data that should not persist beyond the tab being open.

Continue Reading →

Friday, 16 October 2015

How to Get Selected CheckBox Values

This Article will Teach you How you can get Selected Checkbox Values with Comma Seperated in a Variable using Jquery.

Create a new Html File Named test.html and add the below code in that file.

<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<body>

    <input type="checkbox" class="form" value="E001" />
    <input type="checkbox" class="form" value="E002" />
    <input type="checkbox" class="form" value="E003" />
    <input type="checkbox" class="form" value="E004" />

    <input name="searchDonor" type="button" class="button" value="Get Value" onclick="getvalue()" />
    <script>
        function getvalue() {

            var boxesValue = [];
            $('input:checkbox.form:checked').each(function () {
                var value = (this.checked ? $(this).val() : "");
                boxesValue.push(value);
            });

            var str = boxesValue.join(",");
            alert(str);
        }
    </script>

</body>
</html>

Now Run This html file.
Click the checkboxes and Click on Get Value Button.
You will get Selected Check box Value.

Continue Reading →

Topics

ADFS (1) ADO .Net (1) Ajax (1) Angular (47) Angular Js (15) ASP .Net (14) Authentication (4) Azure (3) Breeze.js (1) C# (55) CD (1) CI (2) CloudComputing (2) Coding (10) CQRS (1) CSS (2) Design_Pattern (7) DevOps (4) DI (3) Dotnet (10) DotnetCore (20) Entity Framework (5) ExpressJS (4) Html (4) IIS (1) Javascript (17) Jquery (8) jwtToken (4) Lamda (3) Linq (10) microservice (4) Mongodb (1) MVC (46) NodeJS (8) React (10) SDLC (1) Sql Server (32) SSIS (3) SSO (1) TypeScript (3) UI (1) UnitTest (2) WCF (14) Web Api (16) Web Service (1) XMl (1)

Dotnet Guru Archives