devxlogo

Web Development

Enabling Speech Input

In HTML5 and later, you can add speech recognition to a text input, as simple as adding an attribute to your  elements. We can enable speech input by using the x-webkit-speech attribute like this: When speech input is enabled the element, you should see a small microphone icon displayed on the right of the input. Clicking on this icon will launch a small tooltip to show that your voice is now being recorded. 

Learn How to Force a Style

If a style is marked with !important, it will be used with priority even if there’s a overwriting rule below it. .page { background-color:green !important; background-color:blue;} In the example above,

Adding a Mask in CSS

Masking tells your browser which asset elements should be visible, and is very practical for creating attractive shapes and layouts. Masking can be realized in three ways: using SVG elements,

Load JavaScript Asynchronously on a Web Page

By default, JavaScript script files are loaded synchronously in the page execution and thus are bound to slow down the page. You can asynchronously load the scripts by simply adding

Explore the Difference Between ID and Class

These two selectors often confuse beginners. In CSS, the difference between them is that the class is represented by a dot “.”, while ID is represented by a hash “#”.

Using the Embed Tag in HTML

To embed interactive content, such as a sound, a movie or an swf file, into your site, you need to use this HTML tag. Upload the wav (or the desired

Why XML Parsers Often Are Not Very Useful

int start = xml.indexOf(??????)+ ??????.length();int end = xml.indexOf(??????);String name = xml.substring(start, end); This native XML parsing only works with the most simple XML documents. It will most certainly fail if: