Categories
HTML

How to change the interval time on Bootstrap carousel with HTML?

To change the interval time on Bootstrap carousel with HTML, we set the data-interval attribute.

For instance, we write

<div
  data-ride="carousel"
  class="carousel slide"
  data-interval="10000"
  id="myCarousel"
>
  ...
</div>

to set the data-interval attribute to 10000ms to make the carousel update every 10000ms.

Categories
HTML

How to submit the value of a disabled input field with HTML?

To submit the value of a disabled input field with HTML, we add a hidden field with the name and value attribute values.

For instance, we write

<input type="text" value="22" disabled="disabled" />
<input type="hidden" name="lat" value="22" />

to add a disabled and hidden input with the same name and value attribute values so that the hidden value’s input is submitted.

Categories
HTML

How to force browser to download image files on click with HTML?

To force browser to download image files on click with HTML, we add the download attribute.

For instance, we write

<a href="/path/to/image.png" download> download </a>

to add the download attribute to make the image at the path download instead of opening it.

Categories
HTML

How to stop an input field in a form from being submitted with HTML?

To stop an input field in a form from being submitted with HTML, we remove the name attribute from the input.

For instance, we write

<input type="text" id="in-between" />

to add an input without the name attribute to stop it from being submitted.

Categories
HTML

How to use complex HTML with Twitter Bootstrap’s Tooltip?

To use complex HTML with Twitter Bootstrap’s Tooltip, we set the data-html attribute to true.

For instance, we write

<span
  rel="tooltip"
  data-toggle="tooltip"
  data-html="true"
  data-title="<table><tr><td style='color:red;'>complex</td><td>HTML</td></tr></table>"
>
  hover over me
</span>

to set the data-html attribute to true to let us add HTML as the tooltip’s content.

And we set the data-title attribute to the tooltip content.