HTML <head> Tag

Example An HTML document, with a <title> tag inside the head section: <!DOCTYPE html> <html> <head> <title>Title of the document</title> </head><body> The content of the document…… </body> </html> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The <head> element is a container for all the head elements. The <head> element can […]

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> 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 […]