Showing posts from September, 2020

HTML Interview Questions and Answers

  HTML Interview Questions and Answers 1. Are the HTML tags and elements the same thing? No. HTML elements are defined by a starting tag, may contain some content and a closing tag.For example, <h1>Heading 1</h1> is a HTML element but just <h1> is a starting tag and </h1> is a closing tag. 2. What are tags and attributes in HTML? Tags are the primary component of the HTML that defines how the content will be structured/ formatted, whereas Attributes are used along with the HTML tags to define the characteristics of the element. For example, <p align=” center”>Interview questions</p>, in this the ‘align’ is the attribute using which we will align the paragraph to show in the center of the view. 3. What are void elements in HTML? HTML elements which do not have closing tags or do not need to be closed are Void elements. For Example <br />, <img />, <hr />, etc. 4. What is new about the relationship between the <header> and <h