Block with <per> and <code>
If the formatting (white space, new lines, indentation) of the code matters, use the pre element in combination with
the code element:
If the formatting (white space, new lines, indentation) of the code matters, use the pre element in combination with
the code element:
Meta tags in HTML documents provide useful information about the document including a description, keywords,
author, dates of modifications and around 90 other fields. This topic covers the usage and purpose of these tags.
Attribute | Description |
height | Specifies the canvas height |
width | Specifies the canvas width |
SVG stands for Scalable Vector Graphics. SVG is used to define graphics for the Web
The HTML <svg> element is a container for SVG graphics.
SVG has several methods for drawing paths, boxes, circles, text, and graphic images.
SVG can be written directly into a HTML document. Inline SVG can be styled and manipulated using CSS and
JavaScript.
It’s a good practice to declare the primary language of the document in the html element:
<html lang="en">
If no other lang attribute is specified in the document, it means that everything (i.e., element content and attribute
text values) is in that language.
If the document contains parts in other languages, these parts should get their own lang attributes to “overwrite”
the language declaration.
Attribute | Details |
name | Sets the element’s name, to be used with an a tag to change the iframe’s src. |
width | Sets the element’s width in pixels. |
height | Sets the element’s height in pixels. |
src | Specifies the page that will be displayed in the frame. |
srcdoc | Specifies the content that will be displayed in the frame, assuming the browser supports it. The content must be valid HTML. |
sandbox | When set, the contents of the iframe is treated as being from a unique origin and features including scripts, plugins, forms and popups will be disabled. Restrictions can be selectively relaxed by adding a space separated list of values. See the table in Remarks for possible values. |
allowfullscreen | Whether to allow the iframe’s contents to use requestFullscreen( ) |
Parameters | Details |
src | Address of the resource |
type | Type of embedded resource |
width | Horizontal dimension |
height | Vertical dimension |
The <select> element generates a drop-down menu from which the user can choose an option.
<select name=""> <option value="1">One</option> <option value="2">Two</option> <option value="3">Three</option> <option value="4">Four</option> </select>
Changing the Size
You can change the size of the selection menu with the size attribute. A size of 0 or 1 displays the standard dropdown style menu. A size greater than 1 will convert the drop-down into a box displaying that many lines, with one
option per line and a scrollbar in order to scroll through the available options.
Parameter | Value |
max | How much work the task requires in total |
value | How much of the work has been accomplished already |
position | This attribute returns the current position of the <progress> element |
labels | This attribute returns a list of <progress> element labels (if any) |
Attribute | Details |
width | Sets the element’s width in pixels. |
height | Sets the element’s height in pixels. |
<source> | Defines resources of the audio or video files |
track | Defines the text track for media elements |
controls | Displays controls |
autoplay | Automatically start playing the media |
loop | Plays the media in a repeated cycle |
muted | Plays the media without sound |
poster | Assigns an image to display until a video is loaded |