HTML Interview Question and Answers
HTML Interview Question and Answers
Some common HTML tags are: <html>, <head>, <title>, <body>, <h1>
to <h6>, <p>, <a>, <img>, <ul>, <ol>, <li>, <table>, <tr>, <th>, <td>,
<form>, <input>, <textarea>, <select>, <option>, <button>.
The alt attribute specifies an alternate text for the image if the
image cannot be displayed then the alt attribute provides
alternative information for an image. It is important for accessibility,
as screen readers can read the alt text to users who are visually
impaired.
HTML stands for "Hypertext Markup Language" and XHTML stands for
"Extensible Hypertext Markup Language". Both HTML and XHTML are
markup languages for creating web pages. XHTML is a more strict
and rigorous version of HTML. XHTML requires all elements to be
CSS stands for "Cascading Style Sheets". And it is used to control the
layout and presentation of a web page. It is used to apply the styles
on font, color, and spacing of elements. CSS helps to apply the same
design on multiple HTML elements. CSS makes it easier to maintain
and update the look and feel of a website.
In HTML document links are created using <a> tag. And it contains a
href attribute that specifies the URL of the page which you want to
link. The text which is inside the opening and closing of <a> tags is
the text that will be displayed as the link.
HTML Inline Elements are elements that are placed inline with the
text and only take up as much width as necessary. Examples of
inline elements are: <a>, <strong>, <em>, and <span>.
In HTML the <div> is known as the division tag. The <div> tag is a
block-level element in HTML. Block-level element only represents
their child elements and doesn’t have a special meaning. The <div>
element takes the whole width available on the screen.