Categories
Allgemein

Top 8 HTML interview questions & answers

Test yourself and get prepared for a developer job interview with 8 HTML interview questions & answers.

Top 8 HTML interview
questions & answers

HTML is the foundation of web development and plays a critical role in creating the structure of websites. No matter, if you’re a seasoned developer looking to brush up on your skills or a junior developer – being well prepared for a job interview is essential. In this blog post I’ve compiled to top 8 HTML interview questions with detailed answers to help you deepen your understanding of HTML. Let’s dive into the world of HTML and get ready to impress your potential employers with your expertise!

#1 What is HTML?

HTML stands for Hyper Text Markup Language and is the standard language for creating the structure of websites. The latest version is known as HTML5.  It consists of a series of elements that tell a browser how to display content. HTML elements are pieces of content such as headings, paragraphs, images, etc.

#2 What is formatting in HTML?

HTML Formatting is a process of formatting text for better look and feel. HTML provides us the ability to format text without using CSS. There are many formatting tags in HTML. These tags are used to make text bold, italicized, or underlined.

Following tags are used for formatting text:

<b>bold text
<i>italic text
<u>underline text
<strong>important text
<em>emphasized text
<mark>marked text
<small>smaller text
<del>deleted text
#3 What are tags?

HTML tags are like keywords that tell the browser how to display certain things. Tags indicate the beginning and the end of an HTML element. 

The structure is following:

1) Opening tag:  states where the element begins

2) The content: this is everything that goes into the element

3) Closing tag: states where the element ends

#4 Does all tags have to be closed?

No, there are some tags like the <image> or the <br> tag that don’t require a  closing tag.

#5 How many types of heading does HTML contain?

There are six types of headings which are defined as <h1>, <h2>, <h3>, <h4>, <h5> and <h6>.

Each type has a different text size with <h1> being the biggest one.

#6 How to create a hyperlink in HTML?

For creating a hyperlink you can use the <a> tag. The href attribute is the link destination. You can also add the target attribute and define if a link should open in a new window. 

The syntax for creating a link is following:
<a href=“url“>link text here</a>

#7 What is the difference between HTML elements and tags?

Tags are the starting and ending parts of an HTML element. They begin with < symbol and end with > symbol.

Elements are the content between the tags.

#8 What are some common lists that are used?

<ol> is an ordered list and displays elements in numbered format.

<ul> is an unordered list and displays elements with bullet points.

<dl>, <dt>, <dd> tags are used to define definition lists and they display elements in definition form like in a dictionary. 

Schreibe einen Kommentar