HTML <span> Tag

Example A <span> element used to color a part of a text: <p>My mother has <span style=”color:blue”>blue</span> eyes.</p> Try it Yourself » Definition and Usage The <span> tag is used to group inline-elements in a document. The <span> tag provides no visual change by itself. The <span> tag provides a way to add a hook to a part […]

HTML <div> Tag

Example A section in a document that will have a light blue background color: <div style=”background-color:lightblue”> <h3>This is a heading</h3> <p>This is a paragraph.</p> </div> Try it Yourself » Definition and Usage The <div> tag defines a division or a section in an HTML document. The <div> element is often used as a container for other […]

HTML <!–…–> Tag

Example An HTML comment: <!–This is a comment. Comments are not displayed in the browser–> <p>This is a paragraph.</p> Try it Yourself » Definition and Usage The comment tag is used to insert comments in the source code. Comments are not displayed in the browsers. You can use comments to explain your code, which can […]