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 Text Formatting

Text Formatting This text is bold This text is italic This is subscript and superscript HTML Formatting Elements In the previous chapter, you learned about the HTML style attribute. HTML also defines special elements for defining text with a special meaning. HTML uses elements like <b> and <i> for formatting output, like bold or italic text. Formatting elements were designed to display special types of text: <b> – Bold text <strong> – […]

HTML Basic Examples

Don’t worry if these examples use tags you have not learned. You will learn about them in the next chapters. HTML Documents All HTML documents must start with a document type declaration: <!DOCTYPE html>. The HTML document itself begins with <html> and ends with </html>. The visible part of the HTML document is between <body> and </body>. Example <!DOCTYPE html> <html> <body> <h1>My […]

HTML Introduction

What is HTML? HTML is the standard markup language for creating Web pages. HTML stands for Hyper Text Markup Language HTML describes the structure of Web pages using markup HTML elements are the building blocks of HTML pages HTML elements are represented by tags HTML tags label pieces of content such as “heading”, “paragraph”, “table”, […]