What is an Attribute? :
An attribute defines property for an element, consists of value or name, and appears within element's start tag. HTML elements can have many attributes. Attributes add more information to the HTML document. An HTML attribute contains attribute name, equal to sign and value.
HTML styles :- this attribute used to style HTML element by changing default values.
(We will learn each and every attribute of HTML elements later in more depth)
Some Basic attributes in HTML :
1. Lang attribute of HTML define language for a HTML document.
2. Id and class attributes give reference to HTML elements. Many elements can have same class but ID attribute is only for unique HTML element.
How to do Comments in HTML? :-
Comments are text, files inside a code and are not displayed on browser.
An HTML comment starts with <!- - and ends with - ->.
(OUTPUT)
( As you see in a code comment is not displayed in browser but it is in a source code)
Comments
Post a Comment