Arjun Thakur has Published 1109 Articles

Usage of margin-top property with CSS

Arjun Thakur

Arjun Thakur

Updated on 31-Jan-2020 10:24:12

72 Views

The margin-top specifies the top margin of an element. It can have a value in length, % or auto.ExampleYou can try to run the following code to set the top margin                            This is a paragraph with ... Read More

Usage of border-top-color property in CSS

Arjun Thakur

Arjun Thakur

Updated on 31-Jan-2020 10:18:27

71 Views

The border-top-color property changes the color of the top border.ExampleYou can try to run the following code to implement the border-top-color property:                    p.demo {             border:3px solid;             border-top-color:#FF0000;          }                              Asia is a continent.          

Usage of CSS empty-cells property

Arjun Thakur

Arjun Thakur

Updated on 31-Jan-2020 10:00:36

155 Views

The empty-cells property specifies whether the border should be shown if a cell is empty. It indicates whether a cell without any content should have a border displayed.ExampleThis property can have one of the three values show, hide or inherit.                   ... Read More

CSS padding-right property

Arjun Thakur

Arjun Thakur

Updated on 31-Jan-2020 06:56:10

138 Views

The padding-right specifies the right padding of an element. It sets the right padding of an element. This can take a value in terms of length of %.                            This is a paragraph with a specified right padding                      This is another paragraph with a specified right padding in percent          

How can we get a list of columns in an existing MySQL table?

Arjun Thakur

Arjun Thakur

Updated on 29-Jan-2020 05:14:17

228 Views

Suppose if we forgot the names of the columns in an existing table then we can use SHOW COLUMNS statement as follows to get the list of columns −mysql> SHOW COLUMNS from Employee\G *************************** 1. row ***************************   Field: Id    Type: int(11)    Null: YES     Key: Default: ... Read More

What is composition in HTML5 Canvas?

Arjun Thakur

Arjun Thakur

Updated on 28-Jan-2020 06:04:08

200 Views

HTML5 canvas provides compositing attribute globalCompositeOperation that affect all the drawing operations.ExampleWe can draw new shapes behind existing shapes and mask off certain areas, clear sections from the canvas using globalCompositeOperation attribute as shown below in the example.                    var ... Read More

How to display HTML5 client-side validation error bubbles?

Arjun Thakur

Arjun Thakur

Updated on 27-Jan-2020 09:25:50

229 Views

To display HTML5 client-side validation error bubbles, use the required attribute.You do not need to have JavaScript for client side validations like empty text box would never be submitted because HTML5 introduced a new attribute called required which would be used as follows and would insist to have a value: ... Read More

How to write a JavaScript function to get the difference between two numbers?

Arjun Thakur

Arjun Thakur

Updated on 08-Jan-2020 06:46:47

7K+ Views

Use Math.abs() inside a JavaScript function to get the difference between two numbers in JavaScript.ExampleYou can try to run the following code to get the difference of numbersLive Demo                    var num1, num2;          num1 = 50;   ... Read More

How to display two decimals in MySQL/PHP?

Arjun Thakur

Arjun Thakur

Updated on 31-Dec-2019 08:52:20

275 Views

To display two decimals, use number_format(). Let us first write the PHP code for the same. We have first declared two variables are initialized −$number1=10.3423; $number2=10;Now, display the two decimals using the number_format() function −$result1=number_format ($number1, 2); $result2=number_format ($number2, 2);ExampleFollowing is the example −OutputFollowing is the snapshot of PHP code ... Read More

imagecreatetruecolor() function in PHP

Arjun Thakur

Arjun Thakur

Updated on 31-Dec-2019 08:05:48

696 Views

The imagecreatetruecolor() function creates a new true color image.Syntaximagecreatetruecolor (width , height )Parameterswidth: The image width.height: The image height.ReturnThe imagecreatetruecolor() function returns an image resource identifier on success, FALSE on errors.ExampleThe following is an example Live DemoOutputThe following is the output displaying the height and width of the new image:500 600ExampleLet ... Read More

Advertisements