Nishtha Thakur has Published 387 Articles

Create Default Bootstrap Navbar

Nishtha Thakur

Nishtha Thakur

Updated on 12-Jun-2020 16:40:17

604 Views

Follow the below given steps in Bootstrap to create default navbar −Add the classes .navbar, .navbar-default to the tag.Add role = "navigation" to the above element, to help with accessibility.Add a header class .navbar-header to the element. Include an element with class navbar-brand. This will give the ... Read More

How to use window.location to redirect to a different URL with JavaScript?

Nishtha Thakur

Nishtha Thakur

Updated on 12-Jun-2020 13:43:23

555 Views

You might have encountered a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection.It is quite simple to do a page redirect using JavaScript on the client side. To redirect your site visitors ... Read More

How to call multiple JavaScript functions in onclick event?

Nishtha Thakur

Nishtha Thakur

Updated on 12-Jun-2020 09:29:01

2K+ Views

To call multiple JavaScript functions in on click event, use a semicolon as shown below −onclick="Display1();Display2()"ExampleLive Demo                    function Display1() {             document.write ("Hello there!");          }          function Display2() {             document.write ("Hello World!");          }                     Click the following button to call the function                          

Animate CSS text-decoration-color property

Nishtha Thakur

Nishtha Thakur

Updated on 12-Jun-2020 08:48:01

256 Views

To implement animation on text-decoration property with CSS, you can try to run the following code −ExampleLive Demo                    #demo {             position: absolute;             right: 0;             width: 300px;             height: 200px;             background-color: blue;             text-decoration: underline;             animation: myanim 3s infinite;          }          @keyframes myanim {             30% {                right: 350px;                text-decoration-color: orange;             }          }                     CSS text-decoration-color property                This is demo text.          

Difference between PX, EM and Percent

Nishtha Thakur

Nishtha Thakur

Updated on 12-Jun-2020 08:22:52

647 Views

The px unit defines a measurement in screen pixels. The following is an example −div {    padding: 40px; }The em unit is a relative measurement for the height of a font in em spaces. Because an em unit is equivalent to the size of a given font, if you ... Read More

CSS rest-after Speech Media property

Nishtha Thakur

Nishtha Thakur

Updated on 12-Jun-2020 07:40:13

167 Views

The CSS rest-after property is useful for speech media to set pause after an element.The following is the syntax −rest-after: | none | x-weak | weak | medium | strong | x-strongHere, x-weak | weak | medium | strong | x-strong is the rest by the strength of pauseLet ... Read More

How to specify that a user can enter more than one value in HTML?

Nishtha Thakur

Nishtha Thakur

Updated on 31-May-2020 00:19:32

186 Views

Use the multiple attribute in HTML to specify a user can enter more than one value.ExampleYou can try to run the following code to implement multiple attribute −           Upload multiple files                                  After uploading multiple files, click Submit.                    

What is the usage of onblur event in JavaScript?

Nishtha Thakur

Nishtha Thakur

Updated on 22-May-2020 11:11:53

917 Views

The blur event triggers when object lose focus. You can try to run the following code to learn how to implement onblur event in JavaScript.Example           Write below:                      function newFunc(a) {             a.style.background = "green";          }          

How to properly integrate HTML5 Boilerplate with Twitter Bootstrap?

Nishtha Thakur

Nishtha Thakur

Updated on 04-Mar-2020 06:40:50

250 Views

To integrate, use the Initializr. It is an HTML5 templates generator.You can also use Workless, an open source HTML, CSS & JS framework for developing front-end web applications faster.Workless uses Font Awesome web-font icons and allows you to add a lot of icons in your project. It can automatically style ... Read More

Execute a script when the document is about to be unloaded in HTML?

Nishtha Thakur

Nishtha Thakur

Updated on 03-Mar-2020 12:20:33

190 Views

The onbeforeunload event attribute’ fires when the document is ready to be unloaded.ExampleYou can try to run the following code to implement the onbeforeunload attribute −           Close this window or press F5.                function display() {             return "Wanna stay here or leave?";          }          

Previous 1 ... 4 5 6 7 8 ... 39 Next
Advertisements