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 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 Input Types

This chapter describes the different types for the HTML <input> element. HTML Input Types Here are the different input types you can use in HTML: <input type=”button”> <input type=”checkbox”> <input type=”color”> <input type=”date”> <input type=”datetime-local”> <input type=”email”> <input type=”file”> <input type=”hidden”> <input type=”image”> <input type=”month”> <input type=”number”> <input type=”password”> <input type=”radio”> <input type=”range”> <input type=”reset”> <input type=”search”> […]

HTML Canvas Graphics

The HTML <canvas> element is used to draw graphics on a web page. The graphic to the left is created with <canvas>. It shows four elements: a red rectangle, a gradient rectangle, a multicolor rectangle, and a multicolor text. What is HTML Canvas? The HTML <canvas> element is used to draw graphics, on the fly, via JavaScript. The <canvas> element is only […]

HTML Video

The HTML <video> element is used to show a video on a web page. The HTML <video> Element To show a video in HTML, use the <video> element: Example How it Works The controls attribute adds video controls, like play, pause, and volume. It is a good idea to always include width and height attributes. If height and width are not set, the page might […]

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 […]