HTML interview questions for Freshers:

Here is a list of possible interview questions of HTML, along with answers to help you prepare for your interview:

HTML interview questions for Freshers:

1. What is the Full form of HTML?

HTML stands for Hyper Text Markup Language.

2. What are HTML Elements?

Elements enclose the contents in between the tags. It generally consists of a start tag, content, and an end tag.

3. What is the structure of HTML code?

An HTML document is composed of three parts:

  • A line containing HTML version information.
  • A declarative header element.
  • body, which contains the document’s actual content.

4. What are the HTML important parts?

  • An HTML document is composed of three parts:
    • A line containing HTML version information.
    • A declarative header element.
    • A body, which contains the document’s actual content.

5. What is the extension of the HTML file?

  • The extension of the HTML files is .html

6. What are structured elements in HTML5 ?

  • Following are the structural elements in HTML5:
    • header: Used to contain the header of a webpage.
    • footer: Contains the footer of a webpage.
    • nav: Contains the navigation functionality for the page.
    • article: The article tag is one of the new sectioning elements in HTML5. The HTML article tag is used to represent an article. More specifically, the content within the article tag is independent of the other content of the site (even though it can be related).
    • section: Used to either group different articles into different purposes or subjects, or to define the different sections of a single article.
    • time: Used for marking up times and dates.
    • aside: The aside tag defines some content aside from the content it is placed in.
    • hgroup: The hgroup tag in HTML stands for heading group and is used to group the heading elements.
    • figure: The figure tag specifies self-contained content, like illustrations, diagrams, photos, code listings, etc.

7. Difference between HTML and HTML5?

HTMLHTML5
HTML is referred to as the primary language of the World Wide Web.HTML5 supports both audio and video.
HTML has many updates over time, and the latest HTML version is HTML5.HTML cannot allow JavaScript to run within the web browser, while HTML5 provides full support for running JavaScript.
It uses cookies to store temporary data.It uses SQL databases and application cache to store offline data, It allows drag and drops effects. HTML5 supports new types of form controls, such as date and time, email, number, category, title, Url, search, etc.
It does not allow drag and drop effects.Many elements have been introduced in HTML5. Some of the most important are time, audio, description, embed, fig, shape, footer, article, canvas, navy, output, section, source, track, video, etc.
Older version of HTML is less mobile-friendly.HTML5 language is more mobile-friendly.

8. What are the new features of HTML 4 and HTML 5?

New Features of HTML 4New features of HTML5
New Elements in HTML 4.0Video and Audio
Separation of Structure and Presentationnav
Accessibilityheader
Internationalizationcanvas
Style Sheetsfooter
Client-side ScriptingNew types for input tags
FramesFigure and figcaption
Advanced TablesPlaceholders

9. What is the meaning of doctype! at the top of the HTML document and is it necessary or not?

  • The declaration is not an HTML tag. It is information to the browser about what document type to expect.
  • It is important to instruct the web browsers about the version of the HTML page. Html doctype should be declared very first before any tags.

10. What are the types of tags in HTML?

  • HTML tags can be of two types:
    • Paired TagsSingular Tags
    A tag is said to a paired tag if it along with a companion tag or closing tag appears at the end. In paired tag, the first tag is called the opening tag and the second tag is called the closing tag. The second type of tag is the singular tag, which is also known as a stand-alone tag or empty tag. The stand-alone tag does not have a companion tag or closing tag.

11. Difference between HTML Tags and HTML Elements?

HTML TagsHTML elements
Tags are the starting and ending parts of an HTML element. They begin with < symbol and end with > symbol. Whatever is written inside < and > are called tags.Elements enclose the contents in between the tags. They consist of some kind of structure or expression. It generally consists of a start tag, content, and an end tag.

12.What are the uses of HTML?

  • HTML describes the structure of Web pages. It tells the web browser what each part of a webpage is.
  • So, using HTML, you can define headers, paragraphs, links, images, and more, so your browser knows how to structure the web page you’re looking at.

13. What is HTML?

HTML (Hypertext Markup Language) is the code that is used to structure a web page and its content. For example, content could be structured within a set of paragraphs, a list of bulleted points, or using images and data tables.

Learn HTML Full Course Click Here

14. If div and p elements are given how will you move the p element to the top left corner?

Different ways are there for moving elements to the top left corner using positions.

Example:-

<div>This div element has position: static;</div>
<p class="para">
  An element with position: static; is not positioned in any special way; it is
  always positioned according to the normal flow of the page:
</p>
.para {
  position: fixed;
  top: 0;
  left: 0;
}

15. How to get two div elements in a single row?

  • Ways to get two div elements in a single row.
    • Apply display property value as inline for both div elements.
    • Wrap 2 div elements in another div and use display property flex and direction row.

16. Can HTML5 support drag and drop of elements? If yes then how?

  • Yes, in HTML5 we can drag and drop an element. This can be achieved using the drag and drop related events to be used with the element which we want to drag and drop.
  • Drag and Drop are the HTML5 APIs that allow the user to grab any object on the page, drag it and drop it to a different location.
DragDrop
The user is only able to drag those HTML elements which have the draggable attribute.The drag object of the page can only drop to some specific location where the ondragover event is specified.
Example: <img draggable=’true’/ src=’img.png’>Example : <div ondragover=”allowDrop(event)”></div>

17. What are advantages and disadvantages of HTML?

Advantages of HTML:

  • HTML is Easy to Learn and Use
  • HTML is free of cost
  • Most browsers support HTML
  • HTML is the Most Friendly Search Engine
  • HTML can Integrate Easily with Other Languages

Disadvantages of HTML:

  • HTML cannot produce dynamic output alone, since it’s a static language.
  • Security features are not good at HTML.

18. Where will we place javascript code on an HTML page?

  • In HTML, JavaScript code is inserted between script tags.
  • The script element either contains scripting statements, or it points to an external script file through the src attribute.

19. How many tags are there in HTML?

There are 142 and 132 HTML tags according to Mozilla Developer Network(MDN) and html.com respectively.

20. Do you know the media tag?

  • HTML5 features include native audio and video support without the need for Flash.
  • HTML5 audio and video tags make it simple to add media to a website.

21. What is meant by a body tag?

  • HTML body tag defines the main content of an HTML code that displays on the web page.
  • It can contain text content, paragraphs, headings, images, tables, links, videos, etc.
  • The body must be the second element after the head tag.

22. What are some tags in HTML?

  • Some Tags in HTML
TagElement
divContainer
pParagraph
spanSpan
h1Heading
imgimage
hrHorizontal line
aAnchor

23. What are tags and their uses?

HTML tags are like keywords which defines how a web browser will format and display the content. With the help of tags, a web browser can distinguish between HTML content and simple content. HTML tags contain three main parts: an opening tag, content, and closing tag. But some HTML tags are unclosed.

24. What HTML tags do you use?

The following are some of the HTML tags:

  • h1
  • p
  • br
  • hr
  • a
  • img
  • div
  • span

25. What is the use of an anchor element?

  • We use anchor elements to navigate to other web resources or a specific element within the HTML document. They are also called links.
  • Syntax:

<a href="URL">Content</a>

26. What is a heading element and paragraph element?

  • Heading ElementThe HTML h1 element defines the main heading.

Example:

<h1>This is Heading element</h1>
  • Paragraph ElementThe HTML p element defines a paragraph.

Example:

<P>This is Paragraph element</P>

27. How many types of heading elements are there?

  • HTML defines six levels of headings.
  • HTML headings are defined with the h1 to h6 tags.
  • h1 element defines the most important heading.
  • h6 element defines the least important heading.

28. Explain HTML elements?

  • HTML elements enclose the contents in between the tags
  • It generally consists of a start tag, content, and an end tag.

29. What are HTML tags?

  • HTML Tags are like keywords define that how a web browser will format and display the content.
  • With the help of tags, a web browser can distinguish between HTML content and simple content.
  • HTML tags contain three main parts are an opening tag, content, and closing tag. But some HTML tags are unclosed.
  • Examples : p, h1, <br>, hr, a, <img>, ul, ol, li, form, input, textarea, select, option

30. Difference between div and span tags?

divspan
The div tag is a block-level element.The span tag is an inline element.
It is best to attach it to a section of a web page.It is best to attach a CSS to a small section of a line in a web page.
It accepts align attribute.It does not accept aligned attributes.
This tag should be used to wrap a section, for highlighting that section.This tag should be used to wrap any specific word that you want to highlight on your webpage.

31. Explain about the head, div, script tags?

  • head Tag
    • The head element is a container for metadata (data about data) and is placed between the HTML tag and the body tag.
    • Metadata is data about the HTML document. Metadata is not displayed.
  • div Tag
    • The div tag defines a division or a section in an HTML document.
    • The div tag is used as a container for HTML elements – which is then styled with CSS or manipulated with JavaScript.
    • The div tag is easily styled by using the class or id attribute.
  • script Tag
    • The script tag is used to embed a client-side script (JavaScript).
    • The script element either contains scripting statements, or it points to an external script file through the src attribute.

32. Explain about HTML Table tag, script tag, wbr tag?

  • HTML table Tag
    • The table tag defines an HTML table.
    • Each table row is defined with a tr tag. Each table header is defined with a th tag. Each table data/cell is defined with a td tag.
  • HTML script TagThe HTML script tag is used to define JavaScript.The script element either contains script statements, or it points to an external script file through the src attribute.
  • HTML wbr TagThe wbr (Word Break Opportunity) tag specifies wherein a text it would be ok to add a line-break.

33. What is the head element and why we use head Element in the HTML?

  • The head element primarily is the container for all the head elements, which provide extra information about the document (metadata), or reference to other resources that are required for the document to display or behave correctly in a web browser.
  • The head elements collectively describe the properties of the document such as title, provide meta information like character set, instruct the browser where to find the style sheets or scripts that allows you to extend the HTML document in a highly active and interactive way.

34. What is a style tag in HTML?

  • The HTML style element contains style information for a document, or part of a document. It contains CSS, which is applied to the contents of the document.
  • The HTML style element must be included inside the HTML head element of the document.

35. What are the HTML headers?

The <header> tag in HTML is used to define the header for a document or a section.

Syntax:

<header>
  <h1>Heading here</h1>
  <p>Paragragh  here</p>
</header>

36. What is an HTML container element?

The HTML container element is the div element as it is used as a container for HTML elements.

37. Explain about script tag?

The HTML script element is used to embed a client-side script (JavaScript). It either contains scripting statements, or it points to an external script file through the src attribute.

38. How many h1 tags can be used on a web page?

Using more than one h1 tag is allowed by the HTML specification, but is not considered a best practice. Using only one h1 is beneficial for screenreader users.

39. How to show images?

  • We can show images on the web page using the HTML <img> tag.
  • The <img> tag has two required attributes.
  • src specifies the path to the image.
  • alt specifies an alternate text for the image.

Syntax:

<img src="IMAGE_URL" alt="image" />

40. What are the attributes we can use in img element?

The attributes we can use in img element:

  • src
  • class
  • alt
  • height
  • width etc

41. What is an image element?

  • Image ElementThe HTML img element defines an Image.

Syntax

<img src="IMAGE_URL" />

42. What are the properties of image elements?

Attributes of an image element:

  • alt
  • height
  • src
  • width and many more…
  • No, you can use hyperlinks on text and images both.
  • The HTML anchor tag defines a hyperlink that links one page to another page.
  • The href attribute is the most important attribute of the HTML anchor tag.

Syntax

<a href="link"> Link Text </a>

HTML provides a hyperlink

  • The <a> tag to specify the links in a webpage.
  • The href attribute is used to specify the link and the target attribute is used to specify, where do we want to open the linked document.
  • The target attribute can have the following values:
    • _self : This is a default value. It opens the document in the same window or tab as it was clicked.
    • _blank : It opens the document in a new window or tab.
    • _parent : It opens the document in a parent frame.
    • _top : It opens the document in a full-body window.

45. What is the difference between the Ordered List and the Unordered List?

Ordered ListUnordered List
Used to create a list of related items, in a specific orderUsed to create a list of related items, in no particular order.
Tag – An ‘ordered list’ starts with the ol tag.Tag – An ‘unordered list’ starts with the ul tag.
Each list item starts with the li tag.Each list item starts with the li tag.
By default, list items in the Ordered List are marked with numbers.By default, list items in the Unordered List are marked with bullets.

46. Explain types of lists in HTML?

  • There are three types of lists in HTML:
    • unordered list used to group a set of related items in no particular order.
    • ordered list used to group a set of related items in a specific order.
    • description list used to display name/value pairs such as terms and definitions.

47. What are the Formatting elements?

Formatting elements were designed to display special types of text.

TagType
<b>Bold text
<strong>Important text
<i>Italic text
<em>Emphasized text
<mark>Marked text
<small>Smaller text
<del>Deleted text
<ins>Inserted text
<sub>Subscript text
<sup>Superscript text

48. Do you know HTML formatting?

Formatting elements were designed to display special types of text:

TagType
<b>Bold text
<strong>Important text
<i>Italic text
<em>Emphasized text
<mark>Marked text
<small>Smaller text
<del>Deleted text
<ins>Inserted text
<sub>Subscript text
<sup>Superscript text

49. Explain <hr/> (horizontal line)?

  • HTML Horizontal Rule Element: The HTML hr element inserts a horizontal line and helps to separate the content.

50. Explain about HTML block elements and inline elements?

Block-level Elements:

  • These elements always start in a new line and take up the full width available. So, an HTML Block-level element occupies the entire horizontal space of its parent element.
  • For example, the HTML h1 element, p element, div element, etc.

Inline Elements:

  • These elements do not start in a new line and take up the content width.
  • For example, the HTML button element, img element, anchor element, etc.

51. What is an iframe?

  • The iframe tag specifies an inline frame.
  • An inline frame is used to embed another HTML document within the current HTML document.

52. What is the use of an iframe tag?

  • An iframe is used to display a web page within a web page.
    • Frames make it easier to navigate through a site.
    • The links that appear in the frame can appear through out the site.

Syntax:

<iframe src="URL"></iframe>

53. Why Meta tags are used in HTML?

  • Meta tags in HTML are used by the developer to tell the browser about the page description, author of the template, character set, keywords and many more.
  • Meta tags always go inside head tag of the HTML page.
  • Meta tags is always passed as name/value pairs.
  • Meta tags are not displayed on the page but intended for the browser.
  • Meta tags can contain information about character encoding, description, title of the document etc.
  • Meta tags are used for search engine optimization to tell the search engine about the page contents.
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale = 1.0" />
<meta name="description" content="HTML interview questions" />
<meta name="author" content="Author Name" />
<meta name="copyright" content="All Rights Reserved" />

54. What are audio and video tags?

audio tagvideo tag
The audio tag is used to embed sound content in a document, such as music or other audio streams.The video tag is used to embed video content in a document, such as a movie clip or other video streams.

55. Whether Audio tag available in HTML?

  • Yes available, the audio tag is used to embed sound content in a document, such as music or other audio streams.

56. What are media elements in HTML5?

  • The following are the 5 most popular media elements:
Media ElementDescription
AudioThe HTML audio element is used to play an audio file on a web page.
VideoThe HTML video element is used to show a video on a web page.
TrackThe HTML track tag specifies text tracks for audio or video elements.
SourceThe source tag is used to specify multiple media resources for media elements, such as video, audio.
EmbedThe embed tag defines a container for an external resource, such as a web page, a picture, a media player.

57. How to set controls in video tag?

  • The controls attribute is a boolean attribute.
  • When present, it specifies that video controls should be displayed.
  • Video controls should include:
    • Play
    • Pause
    • Seeking
    • Volume
    • Fullscreen toggle
    • Captions/Subtitles (when available)
    • Track (when available)

58.What is the use of the embedded element in HTML?

The HTML embed element defines a container for an external resource, such as a web page, a picture, a media player, or a plug-in application.

59. How to add a video to a webpage?

There are 2 ways to add a video to a webpage.

  1. HTML video element
<video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4" />
</video>
  1. HTML iframe element
<iframe
  width="560"
  height="315"
  src="https://www.youtube.com/embed/y881t8ilMyc"
  frameborder="0"
  allowfullscreen
></iframe>

60. What are HTML5 elements?

The following tags (elements) have been introduced in HTML5:

  • article
  • aside
  • audio
  • canvas
  • command and many more…

61. Explain the base font tag?

  • Base font tagThe base font tag was used in HTML 4 to specify a default text-color,font-size or font-family for all the text in an HTML document.NoteNot Supported in HTML5

62. Explain Meter tag?

  • Meter tag defines a scalar measurement within a known range or a fractional value. This is also known as a gauge.
  • Attributes:
    • high
    • low
    • max
    • min
    • optimum
    • value

63. What is <del> tag ?

  • del: The Deleted Text element.
  • The HTML del element represents a range of text that has been deleted from a document.

64. What are the HTML graphics tags?

  • HTML Graphics Tags:
    • canvas
    • svg

65. Does a <!DOCTYPE html> tag is a HTML tag?

  • No, the <!DOCTYPE html> declaration is not an HTML tag.
  • There are many type of HTML:
    • HTML 4.01 Strict
    • HTML 4.01 Transitional
    • HTML 4.01 Frameset
    • XHTML 1.0 Strict
    • XHTML 1.0 Transitional
    • XHTML 1.0 Frameset
    • XHTML 1.1
    • many more
  • <!DOCTYPE html> is used to instruct the web browser about the HTML page.

These are two different things.

  • HTML anchor element:
    • The HTML a element defines a Hyperlink.
    • We use Hyperlinks to navigate to other web resources or a specific element within the HTML document. They are also called links.

Syntax:

<a href="URL">Content</a>
  • HTML link element:
    • We use the HTML link element to link the HTML and CSS files. It is a void element. You need to add the HTML link element in the HTML head element.

Syntax:

<link rel="stylesheet" href="tourism.css">
  • HTML script element: To include an external JavaScript file, we can use the HTML script element with the attribute src. The src attribute specifies the path of an external JS file. Syntax: 1<script type=”text/javascript” src=”PATH_TO_JS_FILE.js”></script>HTML
  • HTML link element: We use the HTML link element to link the HTML and CSS files. It is a void element. You need to add the HTML link element in the HTML head element. Syntax: 1<link rel=”stylesheet” href=”tourism.css”>HTML\

68. How to add an extra row in a particular row in a table in HTML?

We can use the rowspan attributes to set how far each cell goes across rows.

<table>
  <tr>
    <td rowspan="2">Row Span</td>
    <td>row 1</td>
  </tr>
  <tr>
    <td>row 2</td>
  </tr>
</table>

69. How to take the table in HTML?

  • The table tag defines an HTML table.
  • Each table row is defined with a tr tag. Each table header is defined with a th tag. Each table data/cell is defined with a td tag.

70. How will you create tables in HTML?

  • The table tag defines an HTML table.
    • Each table row is defined with a tr tag.
    • Each table header is defined with a <th> tag.
    • Each table data/cell is defined with a <td> tag.

71. How to add rows to a table using HTML?

  • We can add rows in the table using <tr> element.

72. What are the HTML Tags in tabular form?

TagPurpose
tableIt defines a table.
trIt defines a row in a table.
thIt defines a header cell in a table.
tdIt defines a cell in a table.

72. Explain HTML Form elements?

The HTML form elements can contain one or more of the following form elements:

  • input
  • label
  • select
  • textarea
  • button
  • fieldset
  • legend
  • data list
  • output
  • option
  • optgroup

73. What are forms and how to create forms in HTML?

  • The HTML form is used to collect the user inputs. HTML provides a <form> tag to create forms.
  • To take input from the user we use the <input> tag inside the form so that all collected user data can be sent to the server for processing.
  • There are different input types like button, checkbox, number, text, password, submit etc.Example:
<!DOCTYPE html>
<html>

<head> </head>

<body>
    <form action="/submit_data.php">
        <label>Enter your Email: </label>
        <input type="email" name="name" /><br>
        <label>Enter Password </label>
        <input type="password" name="mobile_no" /><br>
        <input type="submit" value="Submit" />
    </form>
</body>

</html>

Output:

74. What is checkbox and how to use checkbox?

Checkboxes are used to let a user select one or more options of a limited number of choices.

Syntax:

<input type="checkbox" id="vehicle1" name="vehicle1" value="Bike" />

75. What is the difference between the checkbox and radio button?

HTML radio input element: It is used when only one option to be selected out of several available options. It is created by using an HTML input element but the type attribute is set to the radio.

HTML checkbox input element: A checkbox allows one or many options to be selected. It is also created by using the HTML input element but the type attribute is set to the checkbox.

76. Explain different types of input elements?

  • The <input> tag specifies an input field where the user can enter data.
  • The <input> element is the most important form element.
  • The <input> element can be displayed in several ways, depending on the type attribute.
  • The different input types are as follows:
    1. <input type=”button” />
    2. <input type=”checkbox” />
    3. <input type=”color” /> etc…

77. What are the different types of input tags available and their uses?

Following is a list of some input types:

  • text
    • Defines a one-line text input field.
  • password
    • Defines a one-line password input field.
  • submit
    • Defines a submit button to submit the form to the server.
  • radio
    • Defines a radio button that allows select one option.
  • checkbox
    • Defines checkboxes that allow select multiple options form.

78. What is the difference between checkbox and radio button?

  • HTML radio input element is used when only one option to be selected out of several available options.
  • The checkbox is used when you want to allow the user to select multiple choices.

79. Explain the Select element in HTML?

  • HTML Select Element is used to create a drop-down list.Syntax:
<!DOCTYPE html>
<html>

<head> </head>

<body>
    <select>
        <option>One</option>
        <option>Two</option>
        <option>Three</option>
        <option>Four</option>
    </select>
</body>

</html>

Output:

80. What are input types in HTML?

  • The input HTML element is used to create interactive controls for web-based forms in order to accept data from the user.
  • The available types are as follows:
    • text
    • password
    • button
    • radio
    • checkbox
    • color
    • date
    • email
    • month
    • number
    • range
    • search
    • time
    • URL
    • etc.

81. What is meant by href?

  • href is the most important attribute of the anchor element.
  • href attribute specifies the URL of the page the link goes to.

82. What do we call class in HTML?

  • HTML class Attribute
    • The HTML class attribute is used to specify a class for an HTML element.
    • The class attribute is often used to point to a class name in a style sheet.
    • It can also be used by JavaScript to access and manipulate elements with a specific class name.

83. Why do we use Id?

  • The id attribute specifies a unique id for an HTML element. The value of the id attribute must be unique within the HTML document.
  • The id attribute is used to point to a specific style declaration in a style sheet.
  • It is also used by JavaScript to access and manipulate the element with the specific id.

84. Explain different attributes in HTML?

  • Some attributes in HTML
    • class
    • id
    • href
    • src
    • for
    • width
    • height
    • name
    • alt
    • style
    • checked
    • type and many more…

85. What value will you give to the “href” attribute?

  • The value of the href attribute is URL/path of the page where the link goes to.

86. What are the HTML attributes?

  • HTML attributes provide additional information about HTML elements.
  • Attributes are always specified in the start tag.
  • They usually come in name/value pairs like: name=”value” Ex: src, style, alt, etc.

87. What are pseudo-elements?

  • Pseudo-elements
    • A CSS pseudo-element is a keyword added to a selector that lets you style a specific part of the selected element(s).
    For example: First-line can be used to change the font of the first line of a paragraph(The first line of every p element.).
  p::first-line {
    color: blue;
    text-transform: uppercase;
 }

88. Explain position in HTML and different types of position values?

  • The position property specifies the type of positioning method used for an element.
    • There are five different position values:
      • static
      • relative
      • fixed
      • absolute
      • sticky

89. Can we use the p tag inside a span tag?

  • The span element is an inline element, which should contain only other inline elements and no block elements.
  • So as span is an inline element and p is a block element we cant use the p tag inside a span tag.

90. Can we write a div container in another div container?

  • We can write multiple div containers in another div container.

91. How many columns are there in one row in bootstrap?

  • The Number of columns we specify should be a number in the range of 1 to 12.

92. What are semantic elements?

  • Semantic HTML elements are those that clearly describe their meaning in a human- and machine-readable way.
  • The semantic elements added in HTML5 are:
    • article
    • aside
    • details
    • figcaption
    • figure
    • footer
    • header
    • main
    • mark
    • nav
    • section
    • summary
    • time

93. Difference between HTML and JavaScript?

JavaScriptHTML
JavaScript is an advanced programming language that makes web pages more interactive and dynamicHTML is a standard markup language that provides the primary structure of a website

94. What is a viewport?

  • Viewport: The browser’s viewport is the area of the window in which web content can be seen.

Example of how to use the viewport meta tag in HTML:

<!DOCTYPE html>
<html>
<head>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Fullstackadda</title>
</head>
<body>
	<!-- Your web page content goes here -->
</body>
</html>

95. Write HTML code to create a link that opens in a new tab ?

<a href="https://fullstackadda.com" target="_blank">Link</a>

96. Write HTML code to create an image with a caption ?

<figure>
  <img src="myImage.jpg" alt="Image">
  <figcaption>Caption</figcaption>
</figure>

97. Write HTML code to create an unordered list ?

<ul>
  <li>HTML</li>
  <li>CSS</li>
  <li>JavaScript</li>
</ul>

98. Write HTML code to create a form with a text input field and a submit button ?

<form action="submit.php" method="post">
  <input type="text" name="input">
  <input type="submit" value="Submit">
</form>

99. Write HTML code to create a table with two columns and three rows ?

<table>
  <tr>
    <td>Row a, Column 1</td>
    <td>Row a, Column 2</td>
  </tr>
  <tr>
    <td>Row b, Column 1</td>
    <td>Row b, Column 2</td>
  </tr>
  <tr>
    <td>Row c, Column 1</td>
    <td>Row c, Column 2</td>
  </tr>
</table>

100. Write HTML code to create a button that triggers a JavaScript function when clicked ?

<button onclick="myFunction()">Click me</button>

<script>
function myFunction() {
  alert("WELCOME TO Fullstackadda.com");
}
</script>