Sreemaha has Published 87 Answers

Execute a script when a file is ready to start playing in HTML?

Sreemaha

Sreemaha

Updated on 24-Jun-2020 11:49:44

You can use the oncanplay attribute for the following attributes − <audio> , <embed>, <object> and <video>.Example<!DOCTYPE HTML> <html>    <body>       <video width = "300" height = "200" controls oncanplay = "display()">          <source src = "/html5/foo.ogg" type = "video/ogg" />         ... Read More

How to add an article in HTML5?

Sreemaha

Sreemaha

Updated on 24-Jun-2020 08:32:08

Use the <article> tag to add an article in HTML5. The HTML <article> tag is used in a blog post, forum post, newspaper article etc. It specifies self-contained composition in a site, document, page, or application.ExampleYou can try to run the following code to add an article −<!DOCTYPE html> <html> ... Read More

How to add a list item in HTML?

Sreemaha

Sreemaha

Updated on 24-Jun-2020 07:42:54

The HTML <li> tag is used to add a list item is ordered, unordered, directory, and menu lists. The tag also supports the following additional attributes −AttributeValueDescriptiontypeAaIi1disc square circleDeprecated − Specifies the type of the listvaluenumberSpecifies the value of a list itemExampleYou can try to run the following code to add ... Read More

CSS animation-play-state property

Sreemaha

Sreemaha

Updated on 24-Jun-2020 06:08:23

Use the animation-play-state property to set whether the animation is running or paused.You can try to run the following code to implement the animation-play-state property:ExampleLive Demo<!DOCTYPE html> <html>    <head>       <style>          div {             width: 150px;     ... Read More

How to specify the bottom position of 3D elements with CSS

Sreemaha

Sreemaha

Updated on 23-Jun-2020 16:24:15

To specify the bottom position of 3D elements, use the perspective-origin property.You can try to run the following code to implement the perspective-origin property:ExampleLive Demo <!DOCTYPE html> <html>    <head>       <style>          .demo1 {             position: relative;       ... Read More

How to write PHP script to update an existing MySQL table?

Sreemaha

Sreemaha

Updated on 22-Jun-2020 14:01:31

We can use the SQL UPDATE command with or without the WHERE CLAUSE in the PHP function – mysql_query(). This function will execute the SQL command in a similar way it is executed at the mysql> prompt. To illustrate it we are having the following example −ExampleIn this example, we ... Read More

How can I get the records from MySQL table in result set in a particular way?

Sreemaha

Sreemaha

Updated on 22-Jun-2020 12:16:48

For getting the records from MySQL table in the result set in a particular way either ascending or descending, we need to use the ORDER BY clause along with ASC or DESC keywords. If we will not use any of the above-mentioned keywords then MySQL by default return the records ... Read More

How to get last 2 characters from string in C# using Regex?

Sreemaha

Sreemaha

Updated on 22-Jun-2020 12:16:45

Set the string −string str = "Cookie and Session";Use the following Regex to get the last 2 characters from string −Regex.Match(str, @"(.{2})\s*$")The following is the code −Example Live Demousing System; using System.Text.RegularExpressions; public class Demo {    public static void Main() {       string str = "Cookie and Session"; ... Read More

What is the use of WITH ROLLUP modifier in MySQL?

Sreemaha

Sreemaha

Updated on 22-Jun-2020 11:25:12

“WITH ROLLUP” is a modifier that is used with GROUP BY clause. Mainly, it causes the summary output to include extra rows that represent higher-level summary operations.ExampleIn the example below, WITH ROLLUP modifier gave the summary output with total price value in the extra row.mysql> Select Item, SUM(Price) AS Price ... Read More

CSS overflow: scroll

Sreemaha

Sreemaha

Updated on 22-Jun-2020 08:59:58

In the CSS overflow property with value scroll, the overflow is clipped and a scrollbar gets added. This allows the user to read the entire content.ExampleYou can try to run the following code to implement CSS overflow: scroll property −Live Demo<!DOCTYPE html> <html>    <head>       <style>     ... Read More

Advertisements