Knowing your medium is one of the most important aspects of getting a job. This is especially true for tech careers, where you will often need to know more about your field than your employer. While web design is often less technical than other computer-related career paths, a potential employer may still want to make sure that you know your stuff. Brush up on your HTML knowledge beforehand with the following HTML interview questions:
What is HTML?
HTML stands for HyperText Markup Language. It’s a standard language for displaying images, text, and pages on the internet.
What is the base layout of an HTML web page?
HTML is contained in an <HTML> tag, which also contains a <head> tag and a <body> tag.
What are tags in HTML?
HTML tags are used to format HTML pages. Tags are used with more than (>) and less than (<) signs. They typically come as a pair, however, some tags do not require a closing tag.
What are attributes in HTML?
Attributes are the parts of a tag you can modify. For example, the <a> tag has the attribute href which holds the URL being linked to, or the <font> tag which has various attributes to change the font and color of the text.
What are some examples of tags?
- <h1> is the main heading tag.
- <a> for a hyperlink.
- <body> defines the body text.
- <br> creates a line break.
- <script> defines a client-side script.
How can you make text that won’t be displayed on the web page?
You can ‘comment out’ text like in other coding languages. This is done by starting a line with ‘<!–’ and ending that line with ‘–>’
81% of participants stated they felt more confident about their tech job prospects after attending a bootcamp. Get matched to a bootcamp today.
What is semantic HTML?
Semantic HTML is a style of coding that more closely reflects human language. For example, instead of the <b> tag to make bold text, you could use <strong>.
How do you make a copyright symbol in HTML?
You can make a copyright symbol using © or ©, which HTML will replace with a copyright symbol when the page loads.
The average bootcamp grad spent less than six months in career transition, from starting a bootcamp to finding their first job.
How do you link to something on the same page?
You can make a link using the <a> tag along with a hashtag reference (#). You would need to create a bookmark using the same hash that the <a> tag can link to.
Can you make hyperlinks out of things other than text?
Yes, with pure HTML you can make hyperlinks out of images as well.
Can bullet points have different colors?
Yes, bullet points can have different colors. To change a bullet point’s color, you must change the color of the text, as the bullet point always matches the first part of the text in a list.
What is a marquee?
The marquee tag allows you to put scrolling text or images on your webpage. It can be oriented in different directions: up, down, left, or right.
What is the <iframe> tag?
The <iframe> tag allows you to display another webpage within your webpage in a window, the width and height of which can be adjusted.
How are directory or menu lists and unordered lists different?
They differ mainly in how they handle bullet-style attributes. Directory or menu lists don’t include these attributes, while unordered lists do.
What is the maximum size of a text field?
The maximum size of a text field is 13 characters by default, however this attribute can be changed to be as wide as the browser.
How do you make a link to an email?
To make a link that will direct the user to send an email, use the <a> tag but use ‘mailto:email@example.com,’ with the intended email replacing the example email, as the link.
Is the <br> tag the only tag to break text?
No, the <p> tag and the <blockquote> tag can also be used to break up text.
Where is the background attribute located?
The background attribute is located in the <body> tag. It can be used to set the background of the web page to a particular image or color.
List some common lists used in HTML.
HTML uses lists such as:
- Menu lists
- Directory lists
- Ordered lists
- Unordered lists
- Definition lists
What happens when a character cannot be displayed?
That character will be replaced by a box signifying a character that cannot be displayed. One of the solutions to this problem is rendering the character as an image.
What is an image map?
Image maps allow you to define different clickable areas in one image that can link to different targets. This can give the appearance that different objects in the image are clickable. One can also use the alt text for each area to keep track of where each area directs to.
What is alt text?
Alternative text is a description of an image attached to that image. This provides a description of the image for the visually impaired or for those who cannot load the image.
Are you required to change browsers to load older HTML pages?
The old HTML standard is compatible with the new one, so older pages should be able to load on any browser, although not all of the features may work properly.
How do you create a table in HTML?
To create a table you must use the <table> tag. This allows you to display content in definable rows and columns.
How do you change the color of text in HTML?
You can change the color of text using the ‘color’ attribute in a <font> tag. The tag must wrap around and close after the text that is to be a different color.
You can also change the color, background color, and highlight of text using the <span> tag.
"Career Karma entered my life when I needed it most and quickly helped me match with a bootcamp. Two months after graduating, I found my dream job that aligned with my values and goals in life!"
Venus, Software Engineer at Rockbot
What is the typical layout of an HTML page?
HTML pages typically have a header, a navigation pane, a section pane, an article pane, an aside pane, and a footer pane. Each of these elements can be accessed using tags.
What are meta tags used for in HTML?
Meta tags are used to communicate with the browser about the HTML code being used. This information can be things like the character set used, the author of the HTML code, or a page description, among other things.
What are forms in HTML?
Forms are used to collect information about users. They usually take the form of text boxes that can be typed in by the user. The resulting information can be passed along to the backend for storage.
What is the required attribute used for?
The required attribute is used in conjunction with forms, it marks a field as required, and the user cannot continue unless that field is filled in.
What are SVG elements?
SVG elements are vector images in SVG format. These images can be infinitely scaled without pixelating or distorting.
What is the difference between a block element and an inline element?
Block elements start on a new line and they stretch to fill all of the available space given to it. Text is usually a block element, it continues until the end of the space given to it before it starts a new line.
Inline elements are created on the line where they are mentioned, and they only fill the space required to show them.
What is HTML5?
HTML5 is the newest iteration of HTML, it introduces new features and functionality to the language.
What are some of the new features implemented in HTML5?
HTML5 has new semantic tags like <header>, <footer>, <section>, and <article>. Audio and Video are new elements that replace older players. Canvas and SVGs are new graphical elements.
What is the new canvas element in HTML5?
Which browsers support HTML5?
All modern and commonly used browsers support HTML5 including Chrome, Firefox, Opera, Safari, and Internet Explorer/Microsoft Edge.
What are the video and audio formats supported in HTML5?
HTML5 supports the following formats for audio:
HTML5 supports the following formats for video:
What is the button tag?
HTML5 supports the button tag, which can be used to create a clickable button. This is typically used to reset or submit a form in HTML.
What is the datalist tag?
The HTML5 tag ‘datalist’ can be used to create an autocomplete list of text fields that present suggestions based on the text typed. The options available are predefined by the developer.
What is the DOCTYPE tag, and is it important?
The DOCTYPE tag lets your browser know which version of HTML you are using. Without it any HTML5 elements will not be rendered by the browser; it will read the code as plain HTML.
These few interview questions will not make you an expert in HTML before working in the field, but they can help you refresh your knowledge before heading in for an interview. Keep the above in mind to appear professional and knowledgeable. Any career in handling web pages requires trust, and every employer will want to know that their new employee knows their way around the inner workings of a website.
About us: Career Karma is a platform designed to help job seekers find, research, and connect with job training programs to advance their careers. Learn about the CK publication.