Daniol Thomas has Published 242 Answers

What is the purpose of the var keyword in JavaScript?

Daniol Thomas

Daniol Thomas

Updated on 12-Jun-2020 08:44:23

Like many other programming languages, JavaScript has variables. Variables can be thought of as named containers. You can place data into these containers and then refer to the data simply by naming the container. The var keyword is used to declare variables in JavaScript.Before you use a variable in a ... Read More

Attributes and usage of <audio> element in HTML5

Daniol Thomas

Daniol Thomas

Updated on 04-Jun-2020 11:28:45

The HTML5 audio tag can have a number of attributes to control the look and feel and various functionalities of the control:Sr. No.Attribute & Description1autoplayThis boolean attribute if specified, the audio will automatically begin to play back as soon as it can do so without stopping to finish loading the ... Read More

How to display a short hint that describes the expected value of the element in HTML?

Daniol Thomas

Daniol Thomas

Updated on 31-May-2020 00:27:36

Use the placeholder attribute in HTML to display a hint describing the expected value of the element.ExampleYou can try to run the following code to implement placeholder attribute −<!DOCTYPE html> <html>    <body>       <h2>Login</h2>       <form action = "/new.php">          <input type ... Read More

Execute a script when the browser window is being resized in HTML?

Daniol Thomas

Daniol Thomas

Updated on 30-May-2020 23:28:32

When the web browser window is resized, the onresize attribute triggers.ExampleYou can try to run the following code to implement onresize attribute −<!DOCTYPE html> <html>    <body onresize = "display()">       <p>Resize the window to trigger event.</p>       <script>          function display() { ... Read More

How to include an embedded object in HTML?

Daniol Thomas

Daniol Thomas

Updated on 29-May-2020 23:06:24

To include an embedded object, use the <object> tag. The HTML <object> tag is used to embed multimedia in an HTML document. The <param> tag is also used along with this tag to define various parameters.The HTML <object> tag supports the following additional attributes −AttributeValueDescriptionAlignleftrighttopbottomDefines visual alignment of the objectArchiveURLA ... Read More

How to use inline CSS style for an element in HTML?

Daniol Thomas

Daniol Thomas

Updated on 27-May-2020 19:53:26

Use the style attribute to set the inline CSS style. The following is the syntax −Syntax<element style="mystyles">Here, mystyles are one or more CSS properties. Separate them with semicolons.ExampleYou can try to run the following code to implement inline CSS style for an element in HTML −<!DOCTYPE html> <html>    <body>     ... Read More

What is the role of Keyboard Event altKey Property in JavaScript?

Daniol Thomas

Daniol Thomas

Updated on 23-May-2020 11:00:45

The altkey property is used to show whether ALT key is pressed or not when key event was triggered.ExampleYou can try to run the following code to learn how to implement altKey property in JavaScript.<!DOCTYPE html> <html>    <body>       <input type = "text" onkeydown = "funcAltKey(event)">     ... Read More

How to show current location using HTML5 Geolocation with Google Maps?

Daniol Thomas

Daniol Thomas

Updated on 18-May-2020 08:22:50

HTML5 Geolocation API lets you share your location with your favorite websites. A Javascript can capture your latitude and longitude and can be sent to backend web server and do fancy location-aware things like finding local businesses or showing your location on a map. The geolocation coordinates specify the geographic ... Read More

How to use list attribute in HTML?

Daniol Thomas

Daniol Thomas

Updated on 14-May-2020 10:23:42

In HTML, we use the <datalist> element to specify a list of pre-defined options. This list is for an input element. The list attribute refers to this <datalist> element. HTML5 introduced the list attribute.The list attribute refers to a <datalist> element that contains pre-defined options for an <input> element.ExampleYou can ... Read More

Values to set page size in CSS

Daniol Thomas

Daniol Thomas

Updated on 16-Mar-2020 08:14:58

There are four values that can be used to set page size −auto − The page box will be set to the size and orientation of the target sheet.landscape − Overrides the target's orientation. The page box is the same size as the target, and the longer sides are horizontal.portrait − Overrides the ... Read More

Previous 1 ... 6 7 8 9 10 11 12 ... 25 Next
Advertisements