Previously I discussed HTML tags. An all element with a start tag (such as <div>) and end tag (such as </ div>) There can be one or more elements as an element inside an element or it is called (it is called nested element). See the example below
<!DOCTYPE html> <html> <head> </head> <body> <h1>here is heading</h1> <p>demo content goes here.</p> </body> </html>
Here is a element in the element of an html element with everything inside of <html> </ html>. Similarly, the rest are also an element.
Elements may have an element inside, and there is no element within <h1> </ h1>, which is the content of its content. So it’s h1 elements with the text inside <h1> </ h1>
This example is also given in DOC type, paste the code into our online editor or write it in Notepad and save it with a .html extension (eg index.html or test.html) in the browser, this is the output, a basic HTML document or a web page.
There are 5 elements in this horn, the HTML element, head element, body, h1 and p elements.
* Like the tag, the child element of the html element is the rest of the element. Again the body is the parent and its child is h1 and p elements. Elements that contain other elements are parent and inner child elements.
* The words of the tags should be written in lowercase, such as <body> in such a way that <BODY> is given as if it is a graphical error. Along with the end tag, you will have to give the same mistake.
** Not every article should be written in the body element, instead of the remaining elements such as head etc, only certain elements can be written. The only thing in the browser is that the output comes inside the body element.
Block Level and Inline Elements
There are two types of elements
BlockLevel Element: Elements that defy the left and right places occupy the whole place on the left, called Block Level Elements. In other words, the elements that begin with the new line (when displayed in the browser) are Block Level Elements.
BlockLevel Elements of div, p, h1, ul, li etc.
Inline Element: Elements that do not start because of new lines are inline elements.
inline elements of a, i, b, span, strong etc.
<!DOCTYPE html> <html> <head> </head> <body> <h1>I am a block level element</h1> <p>I am block level element too</p> <strong>I am inline element</strong> <a href="https://ashik.pw">"a" is a inline element </a> </body> </html>