Elements make up an HTML file. These components are in charge of constructing web pages and defining the content on those pages. A start tag < tag name >, a closing tag < /tag name >, and material added between them make up an element in HTML.
The start tag, the end tag and the information in between these two tags taken together is known as an element.
< tagname > content to be displayed< /tagname >
Some elements in HTML do not require a start tag or an end tag; these elements are referred to as Void elements or empty elements because they do not contain content or an end tag. Unpaired tags are another name for these elements. < br > (represents a line break), < hr > (represents a horizontal line), and so on are Void elements.
We can insert one element into another element, such elements are known as nested HTML elements.
< tagname1 > < tagname2 >Content to be displayed < /tagname2 > < /tagname1 >
These elements divide a page into cohesive sections and structure the main part of a web page. For example, a block-level element begins with a new line and spans the entire width of the web page, from left to right. These elements can include both block-level and inline elements.
Inline elements distinguish one part of a text from another and provide it with a specific function. These elements do not begin with a new line and instead take the width that is required. Inline elements are typically used in conjunction with other elements.
Knowledge2life paragraph
Knowledge2life paragraph
welcome to Knowledge2life
welcome to Knowledge2life
|