Recents in Beach

Learn HTML || Chapter 3


 

HTML Elements :-

HTML elements are the building blocks of HTML pages. They are used to create structures and to add content to web pages. There are different types of HTML elements, including:

-Headings: Heading elements are used to create headings and subheadings on a web page.
-Paragraphs: Paragraph elements are used to create paragraphs of text on a web page.
-Links: Link elements are used to create links between web pages.
-Images: Image elements are used to add images to web pages.

HTML elements are typically written using opening and closing tags. For example, a heading element would be written as <h1> heading text </h1>. The opening tag <h1> indicates that this is a heading element, and the closing tag </h1> indicates the end of the heading element.

HTML Attributes :-

HTML attributes are special words used inside the opening tag to control the element's behaviour. Attributes are always specified in the start tag and come in name/value pairs like this: name="value" The most common HTML attributes are the id and class attributes, which are used to identify elements for styling purposes. Other attributes include the href attribute, which is used to specify a link's destination, and the src attribute, which is used to specify an image's source. In addition to the attributes listed above, there are many other attributes that can be used to control the behaviour of HTML elements.

For example in "style" attribute we can directly used CSS for that element.
We will learn about attribute when we learn HTML elements.


Post a Comment

0 Comments