Found 2416 Articles for HTML

How do we add a comment in HTML code?

Yaswanth Varma
Updated on 15-Dec-2022 14:41:33

563 Views

In this article we are going to learn about how do we add a comment in HTML code. Let’s dive into the article for getting better understanding on adding comment in HTML code. To add comments to HTML code, use the comment tag (!— Comment—>). It is a good coding practice so that both the coder and the reader can benefit from assistance in understanding the code. It is helpful to comprehend the intricate code's steps. When codes are being debugged, the comment tag is useful. It is a straightforward bit of code that web browsers wipe off (ignore), ... Read More

How to specify the usage of an element using the tabbing order (tab keyboard button) in HTML?

Ankitha Reddy
Updated on 30-Jul-2019 22:30:22

143 Views

Use the tabindex attribute in HTML to set the tabbing order of an element. It gives you the authority to change the order of your TAB usage on the keyboard. You can try to run the following code to create tabbing order of an element in HTML − Example Live Demo Current Affairs Coding Ground Verbal Ability Quantitative Aptitude We have changed the tab order above. Use TAB on keyboard to view the changes.

Execute a script when media data is loaded in HTML?

Vrundesha Joshi
Updated on 24-Jun-2020 08:28:09

94 Views

Use the onloaddata event to execute a script when media data is loaded. You can try to run the following code to implement onloaddata event −ExampleThe following code generates an alert box when the video gets loaded −                                        Your browser does not support the video element.                      function display() {             alert("Loaded!");          }          

How to add a unique id for an element in HTML?

Abhinaya
Updated on 24-Jun-2020 08:28:45

780 Views

Use the id attribute in HTML to add the unique id of an element.ExampleYou can try to run the following code to implement id attribute −           Tutorialspoint       We provide Tutorials!       More...                function display() {             document.getElementById("myid").innerHTML = "We provide learning videos as well";          }          

How to add multi-language content in HTML?

Prabhas
Updated on 29-May-2020 22:35:53

4K+ Views

The lang attribute in HTML allows you to set content for languages other than English. You can try to run the following code to implement lang attribute.ExampleHere, we have added content in French and Spanish as well.           English       This is demo text             French       Ceci est un texte de démonstration             Spanish       Este es un texto de demostración    

Execute a script when the element is finished loading in HTML?

Yaswanth Varma
Updated on 22-Nov-2023 04:53:02

1K+ Views

In this article we are going to learn about execute a script when the element is finished loading in HTML. When an object is loaded, the onload event takes place. Onload is most frequently used in the element to run a script after a web page has loaded all of its content completely. This can be utilised for a number of things, such as checking for cookies or setting the appropriate version of the page based on the user's browser. Let’s dive into the article to understand more about executing a script when the element is finished loading in ... Read More

Create a paragraph with a right-to-left direction in HTML5

Arjun Thakur
Updated on 03-Mar-2020 05:38:02

282 Views

Use the dir attribute in HTML to set a paragraph with right-to-left direction. Add the value rtl to the dir attribute for the text to be placed from right-to-left.ExampleYou can try to run the following code to implement dir attribute −           This is demo paragraph. This is demo paragraph.          This is demo paragraph. This is demo paragraph. This is demo paragraph.          This is demo paragraph. This is demo paragraph.    

Execute a script when a user releases a key in HTML?

Govinda Sai
Updated on 03-Mar-2020 05:38:42

91 Views

Use the onkeyup attribute. The onkeyup attribute triggers when the user releases a key.ExampleYou can try to run the following code to execute a script on releasing a key −           Press a key inside the textbox.                      function display() {             alert("You released a key!");          }          

Create a hidden paragraph in HTML5

varun
Updated on 29-May-2020 22:34:51

1K+ Views

Use the hidden attribute in HTML5 to create a hidden paragraph in HTML5 i.e. an element no longer relevant.ExampleYou can try to run the following code to implement hidden attribute in HTML5 −           Heading       This is a demo paragraph and visible.       This is a demo paragraph and hidden.    

Create a draggable paragraph in HTML5

Nancy Den
Updated on 24-Jun-2020 08:29:23

346 Views

Use the draggable attribute to create a draggable paragraph. Enable or Disable the drag using the values true and false.ExampleYou can try to run the following code to implement draggable element and drag an element −                    .drag {             float: left;             width: 100px;             height: 75px;             border: 1px dashed #876587;             margin: 15px;             padding: 10px;          }   ... Read More

Advertisements