Interview Questions
What is HTML?
HTML stands for HyperText Markup Language and is the language of the internet. It is the standard text formatting language used for creating and displaying pages on the Internet.HTML documents are made up of the elements and the tags that format it for proper display on pages.
What are HTML tags?
We use HTML tags for placing the elements in the proper and appropriate format. Tags use the symbols <, and > to set them apart from the HTML content.The HTML tags need not be closed always. For example, in the case of images, the closing tags are not required as tag.
What are HTML Attributes?
Attributes are the properties that can be added to an HTML tag. These attributes change the way the tag behaves or is displayed. For example, a tag has an src attribute, which you use to add the source from which the image should be displayed. We add attributes right after the name of the HTML tag, inside the brackets. We can only add the attributes to opening or self-closing tags, but never be in closing tags.
What is a marquee in HTML?
Marquee is used for scrolling text on a web page. It scrolls the image or text up, down, left, or right automatically. To apply for a marquee, you have to use tags.
How do you separate a section of texts in HTML?
We separate a section of texts in HTML using the below tags:
tag ? It is used to separate the line of text. It breaks the current line and shifts the flow of the text to a new line.
tag?This tag is used to write a paragraph of text.
tag?This tag is used to define large quoted sections.
Define the list types in HTML?
The list types in HTML are as below: Ordered list?The ordered list uses
- tag and displays elements in a numbered format.
Unordered list?The unordered list uses
- ,
- tags and displays elements in definition form like in a dictionary.
- tag and displays elements in a bulleted format.
Definition list?The definition list uses
- ,
How do you align list elements in an HTML file?
We can align the list elements in an HTML file by using indents. If you indent each nested list in further than the parent list, you can easily align and determine the various lists and the elements that it contains.
Differentiate between an Ordered list and an Unordered list?
An unordered list uses
What is an element in HTML?
An element in HTML is a set of tags that define a specific part of a web page. It consists of a start tag, content, and an end tag.
What is the difference between HTML and CSS?
HTML is used to create the structure and content of a web page, while CSS is used to define the appearance and layout of the page.
Are the HTML tags and elements the same thing?
No, HTML tags are used to define the structure of a web page, while HTML elements are made up of a set of tags that define a specific part of a web page.
What are void elements in HTML?
Void elements in HTML are tags that do not require a closing tag. They are used to insert images, line breaks, and other content that does not require additional information.
What is the advantage of collapsing white space?
Collapsing white space in HTML can help to reduce the size of web pages and make them load faster. It involves removing unnecessary white space between HTML elements.
What are HTML Entities?
HTML Entities are special characters used to represent characters that cannot be typed on a keyboard. They are often used to display special symbols and foreign characters.
How do you insert a copyright symbol in HTML?
You can insert a copyright symbol by using © or © in an HTML file.
What is white space in HTML?
An empty sequence of space characters is called the white space in HTML. This white space is considered as a single space character in the HTML. White space helps the browser to merge multiple spaces into one single space, and so taking care of indentation becomes easier. White space helps in better organizing the content and tags, making them readable and easy to understand.
How do you create links to different sections within the same HTML web page?
How do you create a hyperlink in HTML?
Define an image map?
An image map in HTML helps in linking with the different kinds of web pages using a single image. It can be used for defining shapes in the images that are made part of the image mapping process.
Why do we use a style sheet in HTML?
A style sheet helps in creating a well-defined template for an HTML webpage that is both consistent as well as portable. We can link a single style sheet template to various web pages, which makes it easier to maintain and change the look of the website.