HTML Interview Questions and Answers For Freshers
HTML Interview Questions and Answers For Freshers
2. Block Element: Block elements are those that create a new line and take up the full
width of their container. Block elements starts from a new line on a webpage and
extends the full width of the available horizontal space of its parent element.
For example: <br> tag is used to break the line. And it doesn’t have an end tag.
While HTML Tag (either opening and closing) is used to mark the start or end of an
element.
Some commonly used HTML tags are h1-h6 for headings, p for paragraph, a for
links, img for images, and div for dividing sections of the page.
Where div is a block-level HTML element and span is a inline-level HTML element.
14. What are the some best practices for HTML coding?
Best practices for HTML coding are using semantic tags, optimizing images for fast
loading speed, minimizing code bloat, and testing code in different browsers and
devices.