All HTML Interview Questions & Answers
HTML stands for Hyper Text Markup Language. It is used to create and format Web documents.
Comment tags <!-- and --> are used to insert comments in HTML.
Internal links make it easy for your users to jump to different parts of your page.
Destination Anchors: <a name="top"></a> Source Anchors: <a href="#top">Top </a>
No, some tags do not come in pair.
For an example: <img> tag and <br> tag do not require end tags.
To insert the copyright symbol, use © or © in an HTML file.
HTML stands for Hypertext Markup Language. It is widely used markup language to create web pages over the internet. HTML tags are used to structure & display content on websites.
HTML Tags are the labels or entity that create web pages. Each tag provides special meaning for the content.
For example: <p> is paragraph tag.
HTML element is a combination of start tag, content and an end tag. Mostly, website content is written inside start tag ( <p>) and an end tag ( </p>).
For example: <p>This is sample content</p> represents HTML element.
A basic HTML page structure mainly consists of 3 HTML tags, <html>, <head>, <body> and <!DOCTYPE html> declaration.
HTML Page Structure Example
<title>This is a sample title</title>
This is sample page content
Attributes provide additional information inside HTML tags. HTML attributes are specified in the opening tag in the form of attribute name and value.
For example, HTML images can have width and height attributes to define the
height of the image. Similarly, HTML links or anchor tag use
href attribute to provide link address.
Syntax: <img src="my-picture.jpg" width="400" height="400">
What is the difference between DIV, SPAN & Paragraph tag in HTML?<div> tag is the most common element to define a division and section. This is a block element which means it adds a line break before and after the content inside. Mostly, <div> tag is used to create content boxes and layouts in a website. <span> an inline element, it only takes the required space in the same line and does not add line breaks. This is helpful for when we need to apply some styles to inline elements such as image, links or highlight piece of text. <p> tag is used to defines paragraphs. The content written in paragraph adds some space before and after each element just like any document paragraphs.