
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

120 Views
The HTML DOM Anchor hreflang property is used to set or return the value of the hreflang attribute of a link.Following is the syntax to set the hreflang property −anchorObj.hreflang = language_codeAbove, language_code represents the language of the linked document. This language code examples, include en for English, bn for Bengali, hi for Hindi, fr for French, la for Latin, ru for Russian, etc.Following is the syntax to return the hreflang property −anchorObj.hreflangLet us now see an example to implement the DOM Anchor hreflang property −Example Live Demo Company Products Display href Part Display Host Part Display hreflang ... Read More

7K+ Views
The onmouseover property allows you set a script when the mouse pointer is moved onto an element. To change the background color, use the HTML DOM backgroundColor property.Let us see an example to implement the onmouseover property and change the background color −Example Live Demo Heading Two Hover over me to change the background color. OutputNow hover over the text to change the background color of the web page −

384 Views
The rect() method of the HTML canvas is used to create a 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 −context.fillRect(p, q, width, height);Above, p: The x-coordinate of the upper-left corner of the rectangleq: The y-coordinate of the upper-left corner of the rectanglewidth: Width of the rectangleheight: Height of the rectangleLet us now see an example to implement the rect() method of canvas −Example Live Demo Your browser does ... Read More

29 Views
The readonly attribute of the element is used to set a textarea as readonly. The visitor cannot change the text in the textarea if it is set as readonly.However, visitor can copy that content.Following is the syntax −Let us now see an example to implement the readonly attribute of the element −Example Live Demo Interview Questions Q1 Q2 Guidelines to appear for interview: The interviewee should reach at 10AM with the certificates. OutputIn the above example, we have 3 ... Read More

527 Views
The fillStyle() property of the HTML canvas is used to set the color or gradient or pattern for the drawing. The default is #000000. 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.fillStyle=color|gradient|pattern;Above, the values, include −color: The drawing’s fill color, which is a CSS color.gradient: Linear or radial gradient object to fill the drawingpattern: The pattern object to fill the drawing.Let us now see an example to implement the fillStyle() property ... Read More

2K+ Views
The fillRect() method of the HTML canvas is used to create a filled rectangle on the web page. The default color 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 −context.fillRect(p, q, width, height);Above, p: The x-coordinate of the upper-left corner of the rectangleq: The y-coordinate of the upper-left corner of the rectanglewidth: Width of the rectangleheight: Height of the rectangleLet us now see an example to implement the fillRect() method ... Read More

414 Views
The name attribute of the element is used to set the name for a button. More than one button can have the same name, but we can submit different values from these buttons using the name attribute.Following is the syntax −Above, btn_name is the name of the button. Let us now see an example to implement the name attribute if the element −Example Live Demo Get the details of the employee: Address Phone Appraisal % OutputIn the above example, different values will ... Read More

152 Views
The target attribute of the element allows you to set where the linked document will open, for example, new window, same frame, parent frame, etc.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.Let us now see an example to implement the target attribute of the elemen −Example Live ... Read More

367 Views
The target attribute of the element allows you to display the response generated after submitting the form.Following is the syntax −Here, _blank is used to display the response in new window or tab, _self display the response in the same frame, _parent displays the response in the parent frame, _top displays the response in the entire body of the window, frame displays the response in a named frame.Let us now see an example to implement the target attribute of the element −Example Live Demo Points Player: Rank: Points: Submit ... Read More

146 Views
The rel attribute of the element is used to set the relationship between the current document and the linked document. This attribute introduced in HTML5 for the element. Following is the syntax −Above, value can be any of the following options that links to −alternate: An alternate version of the document, for example, to print.author: Author of the documentbookmark: Permanent URL used for bookmarkinghelp: Help documentlicense: Copyright informationnext: Next document in a selectionnofollow: Links to a link which you do not want that the Google indexing to follow that link.noreferrer: Specifies that the browser should not send a HTTP ... Read More