
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2202 Articles for HTML

277 Views
The autofocus attribute of the element is used to set focus to the button whenever page loads.Following is the syntax −Above, we have set autofocus to a button. Let us now see an example to implement the autofocus attribute of the element −Example Live Demo Demo Heading This is a demo line. Demo OutputThis will produce the following output displaying the focus is on button 1 −In the above example, we have set the autofocus attribute for the button element − Demo Now, when the page loads, the focus would be on ... Read More

256 Views
The cite attribute of the element is used to set the source of a quotation. Following is the syntax −Above, url is the source of the quotation. Let us now see an example to implement the cite attribute of the element −Example Live Demo Magento Magento as stated on the official website: Magento Commerce, part of Adobe Commerce Cloud, offers a one-of-a-kind eCommerce solution with enterprise power, unlimited scalability, and open-source flexibility for B2C and B2B experiences. Magento allows you to create unique, full-lifecycle customer experiences proven to generate more sales. ... Read More

141 Views
The element in HTML is used to form the text bigger than the default.Note: The element is not supported in HTML Let us now see an example to implement the element in HTML−Example Live Demo Demo Heading This is demo text! This demo text is bigger than the default text. OutputIn the above example, first we have set a normal text −This is demo text!After that, we have set another text using the element − This demo text is bigger than the default text.

501 Views
The target attribute of the element is used to set the default target for the hyperlinks in a document. Syntax Following is the syntax − Here, _blank is used to open the linked document in new window or tab, _self opens the linked document in the same frame as it was clicked, _parent opens the document in the parent frame, _top opens the linked document in the entire body of the window, frame opens the linked document in a named frame. Example Let us now see an example to implement the target attribute of the ... Read More

873 Views
The fill() method in HTML canvas is used to fill the current drawing path. The default is black. The element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that describes the height and width of the canvas i.e. height and width respectively.Following is the syntax−ctx.fill();Let us now see an example to implement the fill() method of canvas −Example Live Demo Your browser does not support the HTML5 canvas tag. var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); ctx.beginPath(); ... Read More

70 Views
The element in HTML in HTML 4 was used to underlined a text on a web page, but HTML5 redefined to display text different from normal text.Let us now see an example to implement the tag−Example Live Demo Shortcut Keys Use the following shortcut keys: Cut: CTRL+X Copy: CTRL+C Paste: CTRL+V Undo: CTRL+Z OutputIn the above example, we have used the tag to display a text other than the default normal text−Use the following shortcut keys: Cut: CTRL+X

122 Views
The element in HTML is used to set keyboard input. Since the element deprecated now, therefore use instead.Note: The tag is not supported in HTML.Let us now see an example to implement the tag in HTML−Example Live Demo Shortcut Keys Use the following shortcut keys: Cut: CTRL+X Copy: CTRL+C Paste: CTRL+V Undo: CTRL+Z OutputIn the above example, we have set the shortcut keys using the element−Paste: CTRL+VWe have set one of the shortcut for pasting text as shown above −CTRL + V

47 Views
The placeholder attribute of the element is used to set a placeholder text in the textarea. A placeholder is considered as a hint, like “Enter you name”, “Enter mobile number”, “Write in 100 words”, etc.Following is the syntax−Above, text is the hint you want to set for the textarea as a placeholder text.Let us now see an example to implement the placeholder attribute of the element−Example Live Demo Interview Questions Q1 Q2 OutputIn the above example, we have set two textarea−Q1 Q2 To display a placeholder text, the placeholder ... Read More

1K+ Views
The clearRect() method in HTML canvas is used to clear the pixels in a given rectangle. The element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that describes the height and width of the canvas i.e. height and width respectively.Following is the syntax −ctx.clearRect(p, q, width, height);Above, p: The x-coordinate of the upper-left corner of the rectangle to clearq: The y-coordinate of the upper-left corner of the rectangle to clearwidth: Width of the rectangle to clearheight: Height of the rectangle to clearLet us now see an example to implement the clearRect() ... Read More

138 Views
The cancelable event property in HTML checks whether an event is a cancelable event or not. The values include TRUE if it is a cancelable event, else FALSE is returned.Following is the syntax −event.cancelableLet us now see an example to implement the cancelable event property −Example Live Demo Checking cancelable event The below button will display whether the event is cancelable or not. Click me function myFunction(event) { var val = event.cancelable; document.getElementById("myid").innerHTML = val; } OutputNow, click on the button to display whether the event is cancelable or not. A boolean value would be returned −