HTML Style Guide

A consistent, clean, and tidy HTML code makes it easier for others to read and understand your code. Here are some guidelines and tips for creating good HTML code. Always Declare Document Type Always declare the document type as the first line in your document. The correct document type for HTML is: Use Lowercase Element […]

HTML Image Maps

With HTML image maps, you can create clickable areas on an image. Image Maps The HTML <map> tag defines an image map. An image map is an image with clickable areas. The areas are defined with one or more <area> tags. Try to click on the computer, phone, or the cup of coffee in the image below: Example Here […]

HTML Table Borders

HTML tables can have borders of different styles and shapes. How To Add a Border When you add a border to a table, you also add borders around each table cell:                   To add a border, use the CSS border property on table, th, and td elements: Example Collapsed Table Borders To avoid […]

HTML – The Head Element

The HTML <head> element is a container for the following elements: <title>, <style>, <meta>, <link>, <script>, and <base>. The HTML <head> Element The <head> element is a container for metadata (data about data) and is placed between the <html> tag and the <body> tag. HTML metadata is data about the HTML document. Metadata is not displayed. Metadata typically define the document title, character set, styles, scripts, and other meta […]

HTML Audio

The HTML <audio> element is used to play an audio file on a web page. The HTML <audio> Element To play an audio file in HTML, use the <audio> element: Example HTML Audio – How It Works The controls attribute adds audio controls, like play, pause, and volume. The <source> element allows you to specify alternative audio files which the browser may choose […]

HTML Geolocation API

Locate the User’s Position The HTML Geolocation API is used to get the geographical position of a user. Since this can compromise privacy, the position is not available unless the user approves it. Note:Geolocation is most accurate for devices with GPS, like smartphones. Browser Support The numbers in the table specify the first browser version […]

HTML Drag and Drop API

In HTML, any element can be dragged and dropped. Example Drag and Drop Drag and drop is a very common feature. It is when you “grab” an object and drag it to a different location. Browser Support The numbers in the table specify the first browser version that fully supports Drag and Drop. API Drag […]

HTML Web Storage API

HTML web storage; better than cookies. What is HTML Web Storage? With web storage, web applications can store data locally within the user’s browser. Before HTML5, application data had to be stored in cookies, included in every server request. Web storage is more secure, and large amounts of data can be stored locally, without affecting […]