Author: misamaliraza94

  • HTML dir Attribute

    The HTML dir attribute specifies the text direction of an element’s content. It is important for enabling HTML in right-to-left scripts (e.g. Arabic, Hebrew, etc.). Numerous languages are written with these scripts. You can use this attribute on any HTML element. It is a part of the Global Attributes. The dir attribute can have the following values: ltr: displays the text in left-to-right…

  • HTML defer Attribute

    The HTML defer attribute specifies that a script is executed when a page has finished the parsing. It is a boolean attribute. This attribute works for external scripts and must be used only when the src attribute is present. There isn’t any difference between HTML 4.01 and HTML5. In XHTML, the defer attribute must be specified as <script defer=”defer”> as attribute minimization is forbidden. You…

  • HTML Autofocus Attribute

    The HTML autofocus attribute is a boolean attribute, which defines that an <input> element must automatically get focus when the page loads. The autofocus attribute is new in HTML5. Syntax Applies to HTML <input> element. Example of the HTML autofocus attribute:

  • HTML Autocomplete Attribute

    The autocomplete attribute defines if an input or a form field must have the autocomplete “on” or “off”. With the autocomplete attribute the browser predicts the value, and when a user starts typing in a field, the browser displays options to fill in the field, based on earlier typed values. The autocomplete can be “on” for the input, and…

  • HTML draggable Attribute

    The HTML draggable attribute is an enumerated attribute and specifies whether the element is draggable or not (either with native browser behavior or the HTML Drag and Drop API). This attribute is commonly used in the drag and drop operations. Images and links are draggable by default. For other elements, you must set the ondragstart event. You…

  • HTML download Attribute

    The HTML download attribute specifies that the target will be downloaded when clicking on the hyperlink. It is used only if the href attribute is set. The value of the attribute is the name of the downloaded file. The browser automatically identifies the correct file extension and adds it to the file (e.g., .img, .txt, .pdf,). The browser will…

  • HTML disabled Attribute

    The HTML disabled attribute is a boolean attribute and specifies that the element must be disabled. This attribute can be used to prevent using the element until some condition has been met, such as selecting a checkbox. When present, the element does not respond to user actions and cannot be focused. Then, it is possible to make…

  • HTML coords Attribute

    The HTML coords attribute specifies the coordinates of an area in the image-map. To specify the shape, size, and placement of an area, it is used with the shape attribute. You can use this attribute on the <area> element. The top-left corner of an area has the 0,0 coordinates. The coords attribute can have the following values: x1, y1, x2, y2. It specifies…

  • HTML controls Attribute

    The HTML controls attribute is a boolean attribute and specifies that the audio/video controls must be displayed. It is new in HTML5. You can use the controls attribute on the following elements: <audio> and <video>. For the <audio> tag, the controls attribute includes: Play Pause Seeking Volume For the <video> tag, the controls attribute includes: Play Pause Seeking Volume Fullscreen toggle Captions/Subtitles Track Syntax Example of the HTML controls attribute used…

  • HTML contenteditable Attribute

    The HTML contenteditable attribute is used to specify whether or not the content of an element is editable. You can use this attribute on any HTML element. It is a part of the Global Attributes. The contenteditable attribute can have two values: true (the content is editable) or false (the content is not editable). If this attribute is not set…