JSON (JavaScript Object Notation) is a lightweight data-interchange format widely used in web development. At the core of working with JSON in JavaScript lies a handy function called JSON.stringify()
. While most developers use this function for simple conversions, there’s more to JSON.stringify()
than meets the eye. Let’s dive deeper into its advanced features and lesser-known capabilities.
Javascript
How to Handle AJAX GET/POST Requests in WordPress
AJAX (Asynchronous JavaScript and XML) is a powerful technique used in modern web development that allows web pages to communicate with the server without reloading the page. WordPress has built-in support for handling AJAX requests using its own hooks and structure. This guide will walk you through setting up both GET and POST AJAX requests in WordPress.
HTML CSS PHP File Upload With Circle Progress Bar
Creating a file upload feature with a circular progress bar involves multiple steps. You’ll need to use HTML, CSS, JavaScript (to handle the progress bar), and PHP (to process the file upload on the server). Here’s a basic example of how to achieve this.
Chapter 41: ARIA
role=”presentation”
An element whose implicit native role semantics will not be mapped to the accessibility API.
<div style="float:left;">Some content on the left.</div> <div style="float:right;">Some content on the right</div> <div role="presentation" style="clear:both;"></div> <!-- Only used to clear floats -->
Chapter 40: Character Entities
Character Entities in HTML
Many symbols and special characters are required while developing a web page in html, but as we know that
sometimes the use of characters directly may interfere with the actual html code which have certain characters
reserved and also certain characters being not available on keyboard. Thus, to avoid the conflict and at same time
to be able to use different symbols in our code w3 org provides us with ‘Character Entities’.
Chapter 39: HTML Event Attributes
HTML Form Events
Events triggered by actions inside a HTML form (applies to almost all HTML elements, but is most used in form
elements):
Chapter 38: HTML 5 Cache
Basic Example of HTML5 cache
this is our index.html file
<!DOCTYPE html> <html manifest="index.appcache"> <body> <p>Content</p> </body> </html>
then we will create index.appcache file with below codes
CACHE MANIFEST index.html
write those files that you want to be cached load index.html then go for offline mode and reload the tab
Note: The two files must be in the same folder in this example
Chapter 37: Global Attributes
Attribute | Description |
class | Defines one or more class names for an element. See Classes and IDs. |
contenteditable | Sets whether the content of an element can be edited. |
contextmenu | Defines a context menu shown when a user right-clicks an element. |
dir | Sets the text direction for text within an element. |
draggable | Sets whether an element can be dragged. |
hidden | Hides an element not currently in use on the page. |
id | Defines a unique identifier for an element. See Classes and IDs. |
lang | Defines the language of an element’s content and its text attribute values. See Content Languages. |
spellcheck | Sets whether to spell/grammar check the content of an element. |
style | Defines a set of inline CSS styles for an element. |
tabindex | Sets the order in which elements on a page are navigated by the tab keyboard shortcut. |
title | Defines additional information about an element, generally in the form of tooltip text on mouseover. |
translate | Defines whether to translate the content of an element. |
Chapter 36: Tabindex
Value | Meaning |
negative | element will be focusable, but it should not be reachable via sequential keyboard navigation |
0 | element will be focusable and reachable through keyboard sequential navigation, but it’s relative order is defined by the platform convention |
positive | element must be focusable and accessible via sequential keyboard navigation; it’s relative order will be defined by the attribute value: the sequential follow the increasing number of the tabindex |
Chapter 35: Marking-up Quotes
Inline with <q>
The q element can be used for a quote that is part of a sentence:
<p>She wrote <q>The answer is 42.</q> and everyone agreed.</p>