HTML <button> Tag

Example A clickable button is marked up as follows: <button type=”button”>Click Me!</button> Try it Yourself » Definition and Usage The <button> tag defines a clickable button. Inside a <button> element you can put content, like text or images. This is the difference between this element and buttons created with the <input> element. Tip: Always specify the type […]

HTML <br> Tag

Example A line break is marked up as follows: This text contains<br>a line break. Try it Yourself » Definition and Usage The <br> tag inserts a single line break. The <br> tag is an empty tag which means that it has no end tag. Browser Support Element <br> Yes Yes Yes Yes Yes Tips and […]

HTML <body> Tag

Example A simple HTML document, with the minimum of required tags: <html> <head> <title>Title of the document</title> </head><body> The content of the document…… </body></html> Try it Yourself » Definition and Usage The <body> tag defines the document’s body. The <body> element contains all the contents of an HTML document, such as text, hyperlinks, images, tables, […]

HTML <body> vlink Attribute

Example Set the visited link color to “red” in an HTML document: <html> <body vlink=”red”> <p><a href=”https://www.w3schools.com”>W3Schools.com</a></p> <p><a href=”https://www.w3schools.com/html/”>HTML Tutorial</a></p> </body> </html> Try it Yourself » Definition and Usage The vlink attribute specifies the color of visited links in a document. Browser Support Attribute vlink Yes Yes Yes Yes Yes Compatibility Notes The <body> vlink attribute is not […]

HTML <body> text Attribute

Example Specify the color of text in an HTML document: <html> <body text=”green”> <h1>Hello world!</h1> <p><a href=”https://www.w3schools.com”>Visit W3Schools.com!</a></p> </body> </html> Try it Yourself » Definition and Usage The text attribute specifies the color of the text in a document. Browser Support Attribute text Yes Yes Yes Yes Yes Compatibility Notes The <body> text attribute is not supported […]

HTML <body> link Attribute

Example Set the default link color to “blue” in an HTML document: <html> <body link=”blue”> <p><a href=”https://www.w3schools.com”>W3Schools.com</a></p> <p><a href=”https://www.w3schools.com/html/”>HTML Tutorial</a></p> </body> </html> Try it Yourself » Definition and Usage The link attribute specifies the default color of unvisited links in a document. Browser Support Attribute link Yes Yes Yes Yes Yes Compatibility Notes The <body> link attribute is […]

HTML <body> bgcolor Attribute

Example Specify a background color for an HTML document: <html> <body bgcolor=”#E6E6FA”> <h1>Hello world!</h1> <p><a href=”https://www.w3schools.com”>Visit W3Schools.com!</a></p> </body> </html> Try it Yourself » Definition and Usage The bgcolor attribute specifies the background color of a document. Browser Support Attribute bgcolor Yes Yes Yes Yes Yes Compatibility Notes The <body> bgcolor attribute is not supported in HTML5. Use […]

HTML <body> background Attribute

Example Specify a background image for an HTML document: <html> <body background=”bgimage.jpg”> <h1>Hello world!</h1> <p><a href=”https://www.w3schools.com”>Visit W3Schools.com!</a></p> </body> </html> Try it Yourself » Definition and Usage The background attribute specifies a background image for a document. Browser Support Attribute background Yes Yes Yes Yes Yes Compatibility Notes The <body> background attribute is not supported in HTML5. Use […]

HTML <body> alink Attribute

Example Set the active link color to “green” in an HTML document: <html> <body alink=”green”> <p><a href=”https://www.w3schools.com”>W3Schools.com</a></p> <p><a href=”https://www.w3schools.com/html/”>HTML Tutorial</a></p> </body> </html> Try it Yourself » Definition and Usage The alink attribute specifies the color of an active link in a document (a link is activated when it is clicked). Browser Support Attribute alink Yes Yes Yes Yes […]

HTML DOM Blockquote Object

Blockquote Object The Blockquote object represents an HTML <blockquote> element. Access a Blockquote Object You can access a <blockquote> element by using getElementById(): Example var x = document.getElementById(“myBlockquote”); Try it Yourself » Create a Blockquote Object You can create a <blockquote> element by using the document.createElement() method: Example var x = document.createElement(“BLOCKQUOTE”); Try it Yourself » Blockquote […]

HTML <blockquote> Tag

Example A section that is quoted from another source: <blockquote cite=”http://www.worldwildlife.org/who/index.html”> For 50 years, WWF has been protecting the future of nature. The world’s leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally. </blockquote> Try it Yourself » Definition and […]

HTML <q> Tag

Example Mark up a short quotation: <p>WWF’s goal is to: <q>Build a future where people live in harmony with nature.</q> We hope they succeed.</p> Try it Yourself » Definition and Usage The <q> tag defines a short quotation. Browsers normally insert quotation marks around the quotation. Browser Support Element <q> Yes Yes Yes Yes Yes […]

HTML <big> Tag

Not Supported in HTML5. Example Make text bigger than normal: <p><big>Bigger text</big></p> Try it Yourself » Definition and Usage The <big> tag is not supported in HTML5. Use CSS instead. The <big> tag defines bigger text. Browser Support Element <big> Yes Yes Yes Yes Yes Differences Between HTML 4.01 and HTML5 The <big> tag is […]

HTML <bdo> Tag

Example Specify the text direction: <bdo dir=”rtl”> This text will go right-to-left. </bdo> Try it Yourself » Definition and Usage bdo stands for Bi-Directional Override. The <bdo> tag is used to override the current text direction. Browser Support Element <bdo> Yes Yes Yes Yes Yes Differences Between HTML 4.01 and HTML5 NONE. Attributes Attribute Value Description […]

HTML DOM Bdo Object

Bdo Object The Bdo object represents an HTML <bdo> element. Access a Bdo Object You can access a <bdo> element by using getElementById(): Example var x = document.getElementById(“myBdo”); Try it Yourself » Create a Bdo Object You can create a <bdo> element by using the document.createElement() method: Example var x = document.createElement(“BDO”); Try it Yourself » Bdo […]

HTML <bdi> Tag

Example Isolate the usernames from the surrounding text-direction settings: <ul> <li>User <bdi>hrefs</bdi>: 60 points</li> <li>User <bdi>jdoe</bdi>: 80 points</li> <li>User <bdi>إيان</bdi>: 90 points</li> </ul> Try it Yourself » Definition and Usage BDI stands for Bi-Directional Isolation. The <bdi> tag isolates a part of text that might be formatted in a different direction from other text outside it. This element […]

HTML <basefont> Tag

Not Supported in HTML5. Example Specify a default text-color and font-size for text on page: <head> <basefont color=”red” size=”5″> </head><body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> Try it Yourself » Definition and Usage The <basefont> tag is not supported in HTML5. Use CSS instead. The <basefont> tag specifies a default text-color, font-size, or font-family […]

HTML <basefont> size Attribute

Example Specify the default font-size for text on page: <head> <basefont size=”7″> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> Try it Yourself » Definition and Usage The size attribute specifies the default font-size for the text in a document. Browser Support Attribute size Not supported Not supported Not supported Not supported Not […]

HTML <basefont> face Attribute

Example Specify the default font for text on page: <head> <basefont face=”courier, serif”> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> Try it Yourself » Definition and Usage The face attribute specifies the default font for the text in a document. Browser Support Attribute face Not supported Not supported Not supported Not supported […]