Found 8895 Articles for Front End Technology

How to create clickable areas in an image in HTML?

Anjana
Updated on 22-Dec-2021 11:09:45

7K+ Views

To create clickable areas in an image, create an image map, with clickable areas. For example, on clicking a box, the different website opens and on clicking a triangle in the same image, a different website opens.The tag defines an area inside an image-and nested inside a tag. The following are the attributes:Sr.NoAttribute & Description1altThe alternate text for the area2coordsThe coordinates for the area3downloadThe target will download when the hyperlink is clicked4shapeThe shape of the area5targetWhere the URL will openExampleYou can try to run the following code to create clickable areas in an image in HTML   ... Read More

How much data can I store in JavaScript cookies?

varma
Updated on 16-Jun-2020 12:14:45

409 Views

The following are the details of the date you can store in JavaScript cookies −Web BrowserMaximum cookiesMaximum size per cookieGoogle Chrome1804096 bytesFirefox1504097 bytesOpera1804096 bytesAndroid504096 bytes

What is the use of JavaScript cookies?

Giri Raju
Updated on 09-Jan-2020 08:33:06

168 Views

Using cookies is the most efficient method of remembering and tracking preferences, purchases, commissions, and other information required for better visitor experience or site statistics.Your server sends some data to the visitor's browser in the form of a cookie. The browser may accept the cookie. If it does, it is stored as a plain text record on the visitor's hard drive. Now, when the visitor arrives at another page on your site, the browser sends the same cookie to the server for retrieval. Once retrieved, your server knows/remembers what was stored earlier.Cookies are a plain text data record of 5 ... Read More

How to set a cookie and get a cookie with JavaScript?

Sreemaha
Updated on 16-Jun-2020 11:56:32

3K+ Views

Set CookieThe simplest way to create a cookie is to assign a string value to the document.cookie object, which looks like this:document.cookie = "key1=value1;key2=value2;expires=date";Here the “expires” attribute is optional. If you provide this attribute with a valid date or time, then the cookie will expire on a given date or time and thereafter, the cookies' value will not be accessible.ExampleTry the following. It sets a customer name in an input cookie.Live Demo                                                  Enter ... Read More

How to set JavaScript Cookie with no expiration date?

Prabhdeep Singh
Updated on 07-Nov-2022 08:25:24

1K+ Views

In this tutorial, we are going to learn to set a JavaScript cookie with no expiration date. Web servers deliver cookies, which are tiny files with frequently unique identifiers, to browsers. Each time your browser requests a new page, the server will receive these cookies. It allows a website to keep track of your preferences and online behavior. The expiration option in a JavaScript cookie is optional. The “expires” attribute is optional. If you provide this attribute with a valid date or time, then the cookie will expire on a given date or time, and thereafter, the cookies' value will ... Read More

How do I create and read a value from the cookie in JavaScript?

usharani
Updated on 16-Jun-2020 11:50:52

109 Views

Create cookiesThe simplest way to create a cookie is to assign a string value to the document.cookie object, which looks like this −document.cookie = "key1=value1;key2=value2;expires=date";Here the “expires” attribute is optional. If you provide this attribute with a valid date or time, then the cookie will expire on a given date or time and thereafter, the cookies' value will not be accessible.ExampleTry the following. It sets a customer name in an input cookie.Live Demo                                                 ... Read More

How do I print Unicode characters in the console using JavaScript?

Shubham Vora
Updated on 22-Jul-2022 12:55:58

3K+ Views

In this article, we will learn how to print Unicode characters in the console using JavaScript. No matter the platform, the software, or the language, Unicode assigns a unique number to each character.Most writing systems' characters are defined by the universal character set known as Unicode, which also assigns each character a unique number (code point). A unit of data called an abstract character (or character) is used to organize, manage, or represent textual data.Most of the modern languages' letters, punctuation marks, diacritical markings, mathematical symbols, technical symbols, arrows, emoji, and other symbols are all included in Unicode.These are different ... Read More

How to set Heading alignment in HTML?

Lokesh Badavath
Updated on 02-Sep-2023 13:50:46

50K+ Views

Headings are the titles or subtitles of the content that you want to display on the web page. Headings help us to get an idea of the content on the web page. Headings and subheadings represent the key concepts ideas and supporting ideas in the content of the web page. HTML have a different level of heading tags. Heading is defined with to tags. It is important to use headings to show the HTML document structure. headings should be used for main headings, followed by headings, then , and so on up to . Heading tags ... Read More

How do I print a message to the error console using JavaScript?

Ali
Ali
Updated on 16-Jun-2020 13:52:32

203 Views

To print a message to the error console, use the console object. Here’s an example −The following will show a red error message −console.error(message);The following gives you the default message −console.log(message);The following gives you the warning message −console.warn(message);The following gives an information message −console.info(message);Add CSS to the log message −console.log('%c Add message!, "background: green; color: white;");Use the following to print error. Consider “num” as the variable name −console.error('num=%d', num);For complete API reference, refer Console API Reference.

How to set background image of a webpage?

Alankritha Ammu
Updated on 09-Sep-2023 23:37:45

32K+ Views

Beautiful webpages are a very strong means of catching user attention. In this article, we are going to see how we can add an image as the background image of a web. Approach There are two approaches to setting an image as the webpage's background image, which we will learn in this article. They are − Using background attribute Using CSS Method 1: Using background attribute We can use the background attribute in the body tag to set an image as the background of the webpage. We will need to specify the URL or the location of the image ... Read More

Advertisements