HTML

Skill
HTML

Top 250 HTML Interview Questions and Answers 2024

250 questions found

Updated 11 Dec 2024

Q1. How to get the count of all text box in a web page?

Ans.

To get the count of all text boxes in a web page, we can use Selenium's findElements() method with the input type 'text'.

  • Use Selenium's findElements() method to find all elements with the input type 'text'

  • Count the number of elements returned by the findElements() method

  • Return the count as the result

View 5 more answers
Frequently asked in

Q2. What is javascript in HTML

Ans.

JavaScript is a scripting language used to add interactivity to HTML pages.

  • JavaScript is embedded in HTML using the

Add your answer

Q3. How do we link our stylesheet with the HTML?

Ans.

Linking stylesheet with HTML is done using the link tag in the head section of HTML.

  • Use the link tag with rel attribute set to stylesheet and href attribute set to the path of the stylesheet file.

  • Place the link tag inside the head section of the HTML document.

  • Example:

Add your answer

Q4. How we link the external files of css and js to the html?

Ans.

External CSS and JS files can be linked to HTML using the and

View 1 answer
Are these interview questions helpful?

Q5. In html span is a tag or not

Ans.

Yes, span is an HTML tag used to group inline elements and apply styles or manipulate them using CSS or JavaScript.

  • Span is an inline element.

  • It does not create a new line.

  • It is commonly used to highlight or style a specific part of a text.

  • It can be used to group multiple inline elements together.

  • Example: This is a red text

View 2 more answers

Q6. How to creat web page by using html and css

Ans.

HTML and CSS are used to create web pages.

  • Start with creating the basic structure of the page using HTML tags.

  • Use CSS to style the page and make it visually appealing.

  • Add content to the page using HTML tags.

  • Use CSS to position and layout the content on the page.

  • Test the page in different browsers to ensure compatibility.

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q7. to create a simple login page in html

Ans.

Create a simple login page in HTML

  • Use

    element to create a form for login

  • Include elements for username and password

  • Use

  • Add CSS for styling the login page

Add your answer
Q8. HTML Question

What are the New tags in Media Elements in HTML5?

Ans.

The new tags in Media Elements in HTML5 are

  • The

  • The

  • Both tags support various attributes and can be styled using CSS.

  • Example:

  • Example:

View 1 answer
Frequently asked in

HTML Jobs

Package Consultant: SAP UX 12-14 years
IBM India Pvt. Limited
4.1
Kolkata
Lead Consultant, Java & UI (HTML, CSS, React, API Developer 5-10 years
Headstrong (GENPACT)
3.9
₹ 11 L/yr - ₹ 25 L/yr
(AmbitionBox estimate)
Noida
React Developer 2-7 years
Virtusa Consulting Services Pvt Ltd
3.8
Chennai

Q9. What is the difference between element and tags in html

Ans.

Elements are building blocks of HTML while tags are used to define elements.

  • Elements are defined by a starting tag, content, and an ending tag.

  • Tags are used to define elements and are enclosed in angle brackets.

  • Elements can have attributes that provide additional information about the element.

  • Tags can be self-closing, such as the tag.

  • Examples:

    is an element,

    is an element with opening and closing tags, is an element with a self-closing tag.

Add your answer

Q10. what is HTML? and tags?

Ans.

HTML is a markup language used for creating web pages. Tags are used to define the structure and content of the page.

  • HTML stands for HyperText Markup Language

  • It is used to create the structure of web pages

  • Tags are used to define elements such as headings, paragraphs, images, links, etc.

  • Example:

    This is a heading

Add your answer
Frequently asked in

Q11. write some program in HTML

Ans.

HTML is a markup language used for creating web pages. It is not a programming language.

  • HTML stands for HyperText Markup Language.

  • It uses tags to structure content on a web page.

  • HTML elements are represented by opening and closing tags.

  • It is used to create headings, paragraphs, lists, tables, forms, and more.

  • HTML can include links, images, videos, and other media.

  • It is not capable of performing complex logic or calculations like a programming language.

Add your answer
Frequently asked in

Q12. Tell me the difference between Semantic and Nonsemantic elements

Ans.

Semantic elements have a meaning and purpose, while nonsemantic elements do not.

  • Semantic elements provide information about the structure and content of a web page.

  • Nonsemantic elements are used for styling and layout purposes.

  • Semantic elements improve accessibility and SEO.

  • Examples of semantic elements include

    ,
  • Examples of nonsemantic elements include

    , ,

    .

View 1 answer

Q13. WHAT IS SYMANTIC TAG IN HTML?

Ans.

Semantic tags in HTML are used to describe the content of a web page, making it more accessible and SEO-friendly.

  • Semantic tags provide meaning to the content of a web page

  • They are used to structure the content of a web page

  • Examples of semantic tags include

    ,
Add your answer

Q14. What different html attributes you have used so far

Ans.

I have used various HTML attributes such as class, id, href, src, alt, title, style, and many more.

  • class

  • id

  • href

  • src

  • alt

  • title

  • style

Add your answer
Frequently asked in

Q15. what is xml and html

Ans.

XML and HTML are markup languages used for structuring and presenting content on the web.

  • XML stands for Extensible Markup Language, used for storing and transporting data.

  • HTML stands for HyperText Markup Language, used for creating web pages.

  • XML focuses on data and its structure, while HTML focuses on the presentation of content.

  • XML tags are user-defined, while HTML tags are predefined.

  • Example: John30 (XML) vs.

    Hello World

    (HTML)

Add your answer
Frequently asked in

Q16. Tell me what is the difference between div and span

Ans.

div is a block-level element while span is an inline element in HTML.

  • div is used to group block-level elements and create sections on a webpage.

  • span is used to style inline elements or group inline elements together.

  • div elements create a line break before and after the element, while span does not.

Add your answer

Q18. How to add image in image tag

Ans.

To add an image in an image tag, use the 'src' attribute and provide the image file path.

  • Use the tag to display an image on a web page

  • Add the 'src' attribute to specify the image file path

  • Optionally, add the 'alt' attribute to provide alternative text for the image

  • Example: A beautiful sunset

Add your answer
Frequently asked in

Q19. What is HTML, PHP and CSS

Ans.

HTML is a markup language used for creating the structure of web pages. PHP is a server-side scripting language used for web development. CSS is a style sheet language used for designing the appearance of web pages.

  • HTML stands for HyperText Markup Language

  • HTML is used to create the structure and content of web pages

  • PHP stands for Hypertext Preprocessor

  • PHP is used for server-side scripting to generate dynamic web pages

  • CSS stands for Cascading Style Sheets

  • CSS is used to define ...read more

Add your answer

Q20. If we give both id and class to an element which one's style will apply first

Ans.

The style applied by the id selector will take precedence over the style applied by the class selector.

  • The id selector has a higher specificity than the class selector.

  • If both selectors have the same specificity, the style applied by the id selector will still take precedence.

  • It is generally recommended to avoid giving both id and class to the same element to prevent confusion and maintain a clear style hierarchy.

View 1 answer

Q21. Difference between span and div tag

Ans.

Span and div tags are both HTML elements used for grouping content, but they have different purposes.

  • Span is an inline element used for grouping text or other inline elements.

  • Div is a block-level element used for grouping larger sections of content.

  • Span is often used for styling individual words or phrases within a larger block of text.

  • Div is often used for creating layout structures and separating content into distinct sections.

  • Span elements do not create a new line, while d...read more

View 1 answer
Frequently asked in

Q22. What is span tag in HTML

Ans.

The span tag in HTML is used to group inline elements and apply styles to them.

  • Used to group inline elements together

  • Does not add any extra space or line breaks

  • Commonly used for styling purposes

Add your answer

Q23. how to create login form in html?

Ans.

To create a login form in HTML, use the

element with input fields for username and password.

  • Use the element to create the form.

  • Add elements for username and password fields.

  • Set the 'type' attribute of the input fields to 'text' or 'password'.

  • Include a submit button using the element with 'type' set to 'submit'.

Add your answer

Q24. Put a table in Html?

Ans.

To create a table in HTML, use the

tag and its related tags.

  • Use the

tag to create the table.

  • Use the

  • tag to create rows within the table.

  • Use the

  • tag to create cells within the rows.

  • Use the

  • tag to create header cells.

  • Use the colspan and rowspan attributes to merge cells.

  • Use CSS to style the table.

  • Example:

    Header 1Header 2
    Row 1, Cell 1Row 1, Cell 2

  • Add your answer

    Q25. What does DOCTYPE mean?

    Ans.

    DOCTYPE is an HTML declaration that defines the version of HTML used in a web page.

    • DOCTYPE stands for Document Type Declaration

    • It is used to inform the web browser about the version of HTML used in the web page

    • It is placed at the beginning of an HTML document

    • It helps the browser to render the web page correctly

    • Examples of DOCTYPE declarations include HTML5, XHTML, and HTML 4.01

    Add your answer

    Q26. What is the use on meta tags in html ?

    Ans.

    Meta tags provide information about the HTML document.

    • Meta tags are placed in the head section of an HTML document.

    • They provide information about the document such as keywords, description, author, etc.

    • Search engines use meta tags to index and display the document in search results.

    • Meta tags can also be used to set the viewport, character set, and other document properties.

    Add your answer

    Q27. Tell me about heading tags?

    Ans.

    Heading tags are HTML elements used to define headings and subheadings on a webpage.

    • There are six levels of heading tags, from h1 to h6.

    • Heading tags should be used in a hierarchical order, with h1 being the main heading and h6 being the least important.

    • Heading tags are important for SEO as they help search engines understand the structure and content of a webpage.

    • Example:

      Main Heading

      Subheading

    Add your answer
    Frequently asked in

    Q28. How to show ip address in html

    Ans.

    To show IP address in HTML, use JavaScript to fetch the client's IP address and then display it on the HTML page.

    • Use JavaScript to fetch the client's IP address

    • Display the IP address on the HTML page

    View 1 answer
    Frequently asked in

    Q29. What is html where it is used

    Ans.

    HTML is a markup language used to create web pages.

    • HTML stands for Hypertext Markup Language

    • It is used to structure content on the web

    • HTML tags are used to define elements such as headings, paragraphs, images, links, etc.

    • It is the backbone of every website

    • HTML is often used in conjunction with CSS and JavaScript

    • Examples of websites built using HTML include Google, Facebook, and Wikipedia

    Add your answer

    Q30. What is the Marquee tag?

    Ans.

    The Marquee tag is an HTML element used to create scrolling or moving text or images on a web page.

    • The Marquee tag is deprecated in HTML5 and should not be used in modern web development.

    • It can be used to create eye-catching effects or to display important information.

    • The direction, behavior, speed, and content of the scrolling can be customized using attributes.

    • Example: Scrolling text

    View 1 answer

    Q31. What is the HTMl and use

    Ans.

    HTML is a markup language used for creating the structure and content of web pages.

    • HTML stands for HyperText Markup Language.

    • It uses tags to define the structure and content of a web page.

    • HTML elements are used to create headings, paragraphs, lists, links, images, tables, forms, etc.

    • It provides a way to format and style the content using CSS.

    • HTML5 is the latest version of HTML, introducing new elements and features.

    Add your answer

    Q32. Why do you use doctype in HTML?

    Ans.

    The doctype declaration is used to specify the version of HTML being used in a web page.

    • The doctype declaration is placed at the very beginning of an HTML document.

    • It helps the browser to understand how to render the web page.

    • Different versions of HTML have different doctype declarations.

    • The doctype declaration also affects the way CSS is interpreted by the browser.

    • Without a doctype declaration, the browser may enter quirks mode, which can lead to inconsistent rendering.

    View 1 answer

    Q33. What is the purpose of an hreflang tag?

    Ans.

    An hreflang tag is used to indicate to search engines the language and geographical targeting of a webpage.

    • Helps search engines understand the language and geographical targeting of a webpage

    • Improves international SEO by serving the correct language version of a webpage to users

    • Prevents duplicate content issues for multilingual websites

    • Example:

    View 2 more answers

    Q34. What is Box Model?

    Ans.

    Box Model is a concept in CSS that defines how elements are displayed on a web page.

    • It consists of four parts: margin, border, padding, and content.

    • Margin is the space outside the border.

    • Border is the line that surrounds the padding and content.

    • Padding is the space between the border and the content.

    • Content is the actual content of the element.

    • Understanding the box model is important for creating responsive and visually appealing web pages.

    Add your answer
    Frequently asked in

    Q35. What is dom

    Ans.

    DOM stands for Document Object Model. It is a programming interface for web documents.

    • DOM represents the structure of an HTML or XML document as a tree-like model.

    • It allows programs to dynamically access and manipulate the content, structure, and style of a document.

    • DOM provides methods and properties to interact with elements, attributes, and text within a document.

    • Example: document.getElementById('myElement') retrieves an element with the specified ID.

    View 1 answer
    Frequently asked in, ,

    Q36. Write a html program for form validation

    Ans.

    A program for form validation using HTML

    • Use the 'required' attribute to make fields mandatory

    • Use the 'pattern' attribute to specify a regular expression for input validation

    • Use the 'min' and 'max' attributes to specify minimum and maximum values for numeric inputs

    • Use the 'maxlength' attribute to limit the length of input fields

    • Use the 'onsubmit' event to trigger validation before submitting the form

    Add your answer
    Frequently asked in

    Q37. What is different between Java and html

    Ans.

    Java is a programming language while HTML is a markup language used for creating web pages.

    • Java is used for developing applications while HTML is used for creating web pages.

    • Java is an object-oriented language while HTML is not.

    • Java requires a compiler to convert code into bytecode while HTML does not require any compilation.

    • Java can be used for creating standalone applications while HTML cannot.

    • Java can be used for creating dynamic web pages while HTML is used for creating s...read more

    Add your answer

    Q38. what is the diff between xhtml&html?

    Ans.

    XHTML is stricter than HTML and follows XML syntax rules.

    • XHTML requires all tags to be closed, while HTML does not.

    • XHTML requires all attribute values to be enclosed in quotes, while HTML does not.

    • XHTML requires all tags to be lowercase, while HTML does not.

    • XHTML follows XML syntax rules, while HTML does not.

    • XHTML is stricter than HTML in terms of syntax and structure.

    Add your answer

    Q39. Provided template to design HTML page with responsive

    Ans.

    To design a responsive HTML page using a provided template.

    • Start by analyzing the template and its structure

    • Use media queries to adjust the layout for different screen sizes

    • Optimize images and use appropriate font sizes

    • Test the page on various devices to ensure responsiveness

    Add your answer

    Q40. different between xml and html

    Ans.

    XML is used for storing and transporting data, while HTML is used for displaying data on web pages.

    • XML is extensible and allows users to define their own tags, while HTML has a predefined set of tags for structuring content.

    • XML focuses on the data itself, while HTML focuses on how the data should be displayed.

    • XML is often used for data interchange between different systems, while HTML is used for creating web pages.

    • Example: John30 (XML) vs.

      Hello, World!

      (HTML)

    Add your answer

    Q41. Tell the functionality of HEAD tag in HTML

    Ans.

    The HEAD tag in HTML is used to provide metadata about the HTML document, such as title, links to stylesheets, and scripts.

    • Contains metadata about the HTML document

    • Includes title of the document

    • Links to external stylesheets using tag

    • Includes scripts using

    Add your answer

    Q42. what inline level and block level elements

    Ans.

    Inline and block level elements in HTML/CSS

    Add your answer
    Frequently asked in

    Q43. what's the benefit of using sematic HTML?

    Ans.

    Semantic HTML provides structure and meaning to content, improving accessibility, SEO, and maintainability.

    • Improves accessibility by providing screen readers and other assistive technologies with meaningful information about the content

    • Enhances SEO by helping search engines better understand the content and context of the webpage

    • Improves maintainability by making the code more readable and easier to understand for developers

    • Examples: Using

      ,
    Add your answer

    Q44. design a html page with a button to print text when clicked

    Ans.

    Design a HTML page with a button to print text when clicked.

    • Create a button element in HTML

    • Add an onclick event to the button

    • In the onclick event, use JavaScript to print the desired text

    Add your answer

    Q45. how to create external tab link

    Ans.

    To create an external tab link, use HTML anchor tag with the target attribute set to '_blank'.

    Add your answer

    Q46. What is HTML meta tag?

    Ans.

    HTML meta tag provides metadata about the HTML document.

    • Meta tags are placed in the head section of HTML document.

    • They provide information about the document such as title, description, keywords, author, etc.

    • Meta tags are used by search engines to index and display information about the webpage.

    • Commonly used meta tags include , <meta name='description'>, and <meta name='keywords'>.</p></li></ul>

    Add your answer

    Q47. Difference between link button and hyperlink

    Ans.

    Link button is a button that navigates to a different page, while hyperlink is a clickable text or image that navigates to a different page.

    • Link button is a button element that triggers an action when clicked.

    • Hyperlink is an anchor element that redirects to a different page or section of the same page.

    • Link button can be styled like a button with CSS.

    • Hyperlink is usually styled with an underline and a different color.

    • Link button can be used for form submissions or triggering J...read more

    Add your answer

    Q48. what is dispaly property in html

    Ans.

    The display property in HTML specifies the type of rendering box used for an element.

    • It determines how an element is displayed on the webpage

    • Common values include 'block', 'inline', 'inline-block', 'none', etc.

    • Changing the display property can alter the layout and behavior of elements

    Add your answer

    Q49. What are the comments of html

    Ans.

    HTML comments are used to add notes or explanations to the code that are not displayed in the browser.

    • Comments start with

    • Comments can be used to temporarily remove code from the page

    • Comments can also be used to add notes for other developers working on the code

    • Comments do not affect the display of the page

    Add your answer

    Q51. What is meant by Aria Label

    Ans.

    Aria Label is a way to provide a descriptive label for non-textual elements on a webpage for accessibility purposes.

    • Aria Label is an HTML attribute that can be added to elements such as images, buttons, and links.

    • It is used to provide a descriptive label for screen readers and other assistive technologies.

    • The label should be concise and descriptive, conveying the purpose or function of the element.

    • For example, an image of a cat could have an Aria Label of 'A cute cat sitting ...read more

    Add your answer

    Q52. What is HTML vs XHTML

    Ans.

    HTML is a markup language for creating web pages, while XHTML is a stricter version of HTML that follows XML rules.

    • HTML is more forgiving and allows for sloppy coding, while XHTML requires well-formed and valid code.

    • XHTML requires all tags to be closed properly, unlike HTML which allows for self-closing tags.

    • XHTML is case-sensitive, while HTML is not.

    • XHTML documents must be well-formed XML documents, while HTML documents do not have to be.

    Add your answer
    Frequently asked in

    Q53. How many types of heading does an HTML contain?

    Ans.

    HTML contains six types of headings.

    • HTML contains six levels of headings, from

      to

      .

    • The

      element represents the highest level of heading, while

      represents the lowest.

    • Headings are used to structure and organize content on a web page.

    • Each heading level has a different visual appearance and semantic meaning.

    • Headings should be used in a hierarchical order, with

      being the main heading and

      being the least important.

    • Example:

      This is a Heading 1

    View 4 more answers

    Q54. What is web page html viewer

    Ans.

    A web page HTML viewer is a tool or software that allows users to view and interpret the HTML code of a web page.

    • A web page HTML viewer is used to analyze and understand the structure and content of a web page.

    • It can be used to inspect the HTML elements, attributes, and styles used in the page.

    • Web developers and designers often use HTML viewers to troubleshoot issues and debug their code.

    • Some popular web page HTML viewers include Chrome Developer Tools, Firefox Developer Tool...read more

    Add your answer

    Q55. How can you include external CSS and JavaScript files in an HTML document.

    Ans.

    External CSS and JavaScript files can be included in an HTML document using link and script tags respectively.

    • Use the tag with the rel attribute set to 'stylesheet' to include external CSS files.

    • Example:

    • Use the

    View 1 answer
    Frequently asked in

    Q56. Tell 5 new features of HTML 5

    Ans.

    HTML 5 has many new features that enhance web development.

    • New semantic elements like

      ,
      ,
      ,
      , etc.

    • New form controls like date pickers, range sliders, etc.

    • Improved multimedia support with

    • Canvas element for dynamic graphics and animations.

    • Offline storage with local storage and web SQL database.

    Add your answer
    Frequently asked in

    Q57. How to create a html file

    Ans.

    To create an HTML file, you need to use a text editor and save the file with a .html extension.

    • Open a text editor like Notepad, Sublime Text, or Visual Studio Code

    • Write your HTML code in the text editor

    • Save the file with a .html extension, for example, index.html

    • You can now open the HTML file in a web browser to see the rendered content

    View 2 more answers
    Frequently asked in

    Q58. How would you change the format of all the phone numbers in 1000 static html pages?

    Ans.

    Use a script to automate the process of changing phone number format in 1000 static html pages.

    • Create a script using a programming language like Python or JavaScript.

    • Use regular expressions to identify phone numbers in the HTML pages.

    • Use string manipulation functions to change the format of the phone numbers.

    • Test the script on a small sample of HTML pages before running it on all 1000 pages.

    • Make sure to backup the original HTML pages before making any changes.

    Add your answer
    Frequently asked in

    Q60. what is variable html structure coding in array

    Ans.

    A variable is a storage location in a computer program that holds data and can be referenced and manipulated.

    • Variables are used to store data in a program and can be of different types such as integers, strings, or arrays.

    • In HTML, variables are not directly used, but data can be stored in attributes or elements for manipulation.

    • Coding in an array involves storing multiple values in a single variable, accessed by index numbers.

    View 1 answer

    Q61. How was the importance of html.

    Ans.

    HTML is a fundamental building block of web development, used to create the structure of web pages.

    • HTML stands for HyperText Markup Language.

    • It is used to create the structure of web pages by using elements like , , ,

      ,

      , etc.

    • HTML is essential for creating content on the web and is often combined with CSS for styling and JavaScript for interactivity.

    • It provides a way to organize and format content on a webpage, making it accessible and user-friendly.

    • HTML5 is the latest versio...read more

    View 1 answer
    Frequently asked in

    Q62. please explain different types of layout in html

    Ans.

    Different types of layout in HTML include fixed, fluid, responsive, and grid layouts.

    • Fixed layout: Elements have fixed widths and heights.

    • Fluid layout: Elements adjust their widths and heights based on the screen size.

    • Responsive layout: Elements adapt to different screen sizes using media queries.

    • Grid layout: Elements are arranged in a grid-like structure using CSS Grid or Flexbox.

    View 1 answer

    Q63. Difference between the URL and Html mode

    Ans.

    URL mode sends HTTP requests to the server while HTML mode renders the page in a browser.

    • URL mode is used to test server performance by sending HTTP requests.

    • HTML mode is used to test client performance by rendering the page in a browser.

    • URL mode is faster and more efficient for testing server performance.

    • HTML mode is slower but more accurate for testing client performance.

    • URL mode is typically used for load testing while HTML mode is used for stress testing.

    Add your answer
    Frequently asked in

    Q64. Which version of html is getting at thid time and why?

    Ans.

    HTML5 is the latest version of HTML.

    • HTML5 was released in 2014.

    • It introduced new semantic elements like

      ,
      ,
    • It also introduced new form controls like ,

    • HTML5 supports multimedia elements like

    • It also has improved support for mobile devices.

    • HTML5 is backward compatible with older versions of HTML.

    Add your answer
    Frequently asked in

    Q65. How to insert the copyright symbol in the HTML file?

    Ans.

    The copyright symbol can be inserted in an HTML file using the HTML entity code © or the Unicode character code ©.

    • Use the HTML entity code © to insert the copyright symbol.

    • Alternatively, use the Unicode character code © to insert the copyright symbol.

    • Place the entity or character code within the HTML file where you want the copyright symbol to appear.

    View 1 answer

    Q66. What is different between html html 4 nd html 5

    Ans.

    HTML5 is the latest version of HTML, introducing new features like semantic elements, audio/video support, and canvas for graphics.

    • HTML5 introduced new semantic elements like

      ,
    • HTML5 added support for audio and video elements, allowing playback without plugins.

    • HTML5 introduced the element for drawing graphics and animations.

    • HTML5 introduced new form input types like email, date, range, etc.

    • HTML5 added new APIs like Geolocation, Web Storage, Web Workers, and WebSockets...read more

    View 1 answer

    Q67. Difference between block, div and section

    Ans.

    Block, div and section are HTML elements used for structuring web pages.

    • Block is a generic container for grouping content and applying styles.

    • Div is a block-level element used for grouping content and applying styles.

    • Section is a semantic element used for grouping related content.

    • Div and section are similar, but section has a more specific meaning and should be used for larger content areas.

    • Block and div are often used interchangeably, but block is a more general term.

    • All thr...read more

    Add your answer

    Q68. What is Embedded Style Sheet?

    Ans.

    Embedded Style Sheet is a type of CSS that is written directly within the HTML file.

    • Embedded Style Sheet is used to define the style of a single HTML document.

    • It is written within the

    View 1 answer

    Q69. Where to add description in html ?

    Ans.

    The description in HTML can be added in the section using the tag.

    • The description should be added within the section of the HTML document.

    • Use the tag with the attribute 'name' set to 'description' to define the description.

    • The content of the description should be placed within the 'content' attribute of the tag.

    • The description should be concise and accurately summarize the content of the webpage.

    • Including relevant keywords in the description can help improve search engine ...read more

    View 1 answer

    Q70. 3. In how many ways can we display an attribute of HTML?

    Ans.

    There are multiple ways to display an attribute in HTML.

    • Using inline attribute in HTML tags

    • Using CSS to style the attribute

    • Using JavaScript to manipulate and display the attribute

    View 1 answer

    Q71. What is the difference between cellspacing and cellspadding?

    Ans.

    cellspacing is used to control the space between cells in a table, while cellpadding is used to control the space between cell content and cell borders.

    • cellspacing is a table attribute, while cellpadding is a cell attribute

    • cellspacing is used to control the space between cells horizontally and vertically

    • cellpadding is used to control the space between cell content and cell borders

    • cellspacing is specified in pixels or percentage, while cellpadding is specified in pixels

    View 1 answer

    Q72. What is Open Graph Tag?

    Ans.

    Open Graph Tag is a meta tag that allows websites to control how their content is shared on social media platforms.

    • Open Graph Tags are used to specify the title, description, image, and other information about a webpage when shared on social media.

    • They help in improving the appearance of shared links on platforms like Facebook, Twitter, and LinkedIn.

    • Example:

    View 1 answer

    Q73. What features of HTML have you used?

    Ans.

    I have used features like semantic tags, forms, tables, and multimedia elements in HTML.

    • Semantic tags like

      ,
      ,
    • Forms for user input with

      , ,
    • Tables for organizing data with

      , ,

    • Multimedia elements like ,

    Add your answer

    Q74. What is difference between Figure tag and Img tag.

    Ans.

    The figure tag is used to group media content with a caption, while the img tag is used to display an image.

    • The figure tag is used to group media content, such as images, videos, or illustrations, with a caption.

    • The img tag is used specifically to display an image on a web page.

    • The figure tag can contain multiple media elements, while the img tag is used for a single image.

    • The figure tag provides semantic meaning and accessibility for media content.

    • The img tag is a self-closi...read more

    View 1 answer
    Q75. HTML Question

    In how many ways can we position an HTML element? Or what are the permissible values of the position attribute?

    Ans.

    There are 5 permissible values for the position attribute in HTML.

    • The permissible values for the position attribute are static, relative, fixed, absolute, and sticky.

    • The default value is static, which means the element is positioned according to the normal flow of the document.

    • Relative positioning allows an element to be positioned relative to its normal position.

    • Fixed positioning positions the element relative to the browser window, so it stays in the same place even if the ...read more

    View 1 answer
    Frequently asked in

    Q76. Tel me about HTML and Tel me about basics in python

    Ans.

    HTML is a markup language used for creating web pages. Python is a high-level programming language used for various applications.

    • HTML stands for Hypertext Markup Language

    • It is used for creating the structure and content of web pages

    • Python is an interpreted language with dynamic semantics

    • It is used for web development, data analysis, artificial intelligence, etc.

    • Python uses indentation for block statements instead of curly braces

    View 1 answer

    Q77. How to link a web page to another in Html

    View 1 answer
    Frequently asked in

    Q78. what is the difference between a block-level element and an inline elements ?

    Ans.

    Block-level elements start on a new line and take up the full width available, while inline elements do not.

    • Block-level elements create a block of content, such as paragraphs, headings, and divs.

    • Inline elements flow within the text and do not create a new line, such as spans, links, and images.

    • Block-level elements can have width, height, margin, and padding properties, while inline elements do not.

    • Block-level elements can contain other block-level and inline elements, while i...read more

    View 1 answer

    Q79. How to create basic html

    Ans.

    Creating basic HTML involves using tags to structure content and adding elements like headings, paragraphs, and links.

    • Start with the doctype declaration:

    • Create the HTML structure using the tag.

    • Add the section for metadata and the section for content.

    • Use tags like

      for headings,

      for paragraphs, and for links.

    • Apply CSS styles using the

    View 1 answer
    Frequently asked in

    Q80. What is best image format is used for seo in html pages?

    Ans.

    The best image format for SEO in HTML pages is JPEG.

    • JPEG is widely supported by browsers and has good compression without losing quality.

    • Use descriptive file names and alt text for images to improve SEO.

    • Consider using WebP format for better compression and faster loading times.

    Add your answer

    Q81. What is html, what is angular

    Ans.

    HTML is a markup language used for creating web pages, while Angular is a JavaScript framework for building dynamic web applications.

    • HTML stands for HyperText Markup Language and is used to structure content on web pages

    • Angular is a JavaScript framework developed by Google for building single-page applications

    • Angular allows for the creation of dynamic web pages with features like data binding, dependency injection, and routing

    Add your answer

    Q82. How we define html

    Ans.

    HTML is a markup language used for creating the structure of web pages.

    • HTML stands for HyperText Markup Language

    • It uses tags to define the structure of content on a web page

    • Example:

      This is a heading

    Add your answer

    Q83. How to insert html Code in Wordpress?

    Ans.

    HTML code can be inserted in WordPress using the Text editor or a plugin.

    • Switch to Text editor mode in WordPress

    • Paste the HTML code in the desired location

    • Save or publish the post/page

    • Alternatively, use a plugin like 'Insert Headers and Footers' to add HTML code site-wide

    Add your answer

    Q84. What is !important in html?

    Ans.

    In HTML, !important is a CSS rule that gives a style declaration more weight than normal.

    • Used to override other styles

    • Should be used sparingly

    • Example: color: red !important;

    Add your answer

    Q85. Name some of the features in HTML 5

    Ans.

    HTML 5 features include new semantic elements, multimedia support, offline storage, and improved form controls.

    • New semantic elements like

      ,
      ,
    • Multimedia support with

    • Offline storage with localStorage and sessionStorage

    • Improved form controls such as date, time, email, and number inputs

    Add your answer
    Frequently asked in

    Q86. What is the use of html

    Ans.

    HTML is a markup language used for creating and structuring web pages.

    • HTML stands for HyperText Markup Language

    • It is used to create the structure of web pages by using tags

    • HTML tags are used to define elements such as headings, paragraphs, images, links, etc.

    • It is the backbone of web development and is essential for creating websites

    Add your answer

    Q87. Write simple code using HTML

    Ans.

    Simple HTML code example

    • Use tag to start HTML document

    • Include tag for metadata

    • Use tag for content

    • Add elements like

      ,

      , for text, images, etc.

    Add your answer
    Frequently asked in

    Q88. Find elements and Xpath

    Ans.

    To find elements and Xpath, use browser developer tools and inspect element feature.

    • Use browser developer tools to inspect elements on a webpage

    • Right click on the element and select 'Inspect' to view its HTML code

    • Identify unique attributes like class, id, or name to create Xpath

    • Use Xpath expressions to locate elements on the webpage

    Add your answer
    Frequently asked in

    Q89. Can we write Article Tag inside Session Tab

    Ans.

    Yes, it is possible to write Article Tag inside Session Tab.

    • Article Tag can be written inside Session Tab using HTML and CSS.

    • It is important to ensure that the code is properly structured and validated.

    • This can improve the organization and readability of the code.

    • Example:

    Add your answer

    Q90. How do you give space in span

    Ans.

    To give space in span, use CSS properties like padding, margin, or line-height.

    • Use padding property to add space inside the span element

    • Use margin property to add space outside the span element

    • Use line-height property to adjust the height of the line containing the span element

    Add your answer
    Frequently asked in

    Q91. Explain the basic structure of an HTML document.

    Ans.

    The basic structure of an HTML document includes the doctype declaration, html tag, head tag, and body tag.

    • DOCTYPE declaration specifies the version of HTML being used

    • HTML tag contains the entire HTML document

    • Head tag includes meta information, title, and links to external resources

    • Body tag contains the content of the webpage

    Add your answer
    Frequently asked in

    Q92. What is grid in html ?

    Ans.

    Grid in HTML is a layout system that allows for the creation of responsive and organized web designs.

    • Grid in HTML is created using the CSS Grid Layout module.

    • It allows for the creation of complex layouts with rows and columns.

    • Grid items can be placed and aligned within the grid using grid lines and tracks.

    • Grid also supports responsive design, allowing for easy adaptation to different screen sizes.

    • Example:

      ...

    Add your answer

    Q93. How to write HTML code considering web accessibility for disabled person

    Ans.

    Writing accessible HTML code for disabled persons

    • Use semantic HTML tags to provide structure and meaning to the content

    • Include alternative text for images and other non-text content

    • Ensure color contrast meets accessibility standards

    • Provide keyboard navigation and focus styles for interactive elements

    • Use ARIA attributes to enhance accessibility for dynamic content

    • Test with screen readers and other assistive technologies

    • Consider using accessible frameworks and libraries

    • Provide ...read more

    Add your answer
    Frequently asked in

    Q94. What is the uses of HTML

    Ans.

    HTML is a markup language used for creating and structuring web pages.

    • HTML is used to create the structure of a web page by using elements like headings, paragraphs, images, links, etc.

    • It is used to define the layout and formatting of content on a webpage.

    • HTML is essential for building websites and web applications.

    • It allows for the inclusion of multimedia elements like videos and audio.

    • HTML forms the backbone of web development and is often used in conjunction with CSS and J...read more

    Add your answer

    Q95. How to create an HTML table.

    Ans.

    HTML tables can be created using the

    tag with nested (table row) and
    (table data) tags.

    • Use the

      tag to create the table structure.

    • Use the

    • tag to define each row in the table.

    • Use the

    • tag to define each cell in the row.

    • Add content inside the

    • tags to display data in the table.

    • Use attributes like colspan and rowspan to merge cells or span across multiple rows/columns.

    Add your answer

    Q96. Write some Html selectors

    Ans.

    HTML selectors are used to target specific elements on a webpage for styling or manipulation.

    • Use element selectors to target specific HTML elements (e.g.

      ,

      ,

      ).

    • Use class selectors to target elements with a specific class (e.g. .classname).

    • Use ID selectors to target elements with a specific ID (e.g. #idname).

    • Use attribute selectors to target elements with specific attributes (e.g. [attribute=value]).

    Add your answer
    Frequently asked in

    Q97. Can you define the difference of between ul and ui

    Ans.

    ul is an HTML element used to create an unordered list, while ui is not a valid HTML element.

    • ul is used to create a bulleted list of items

    • ui is not a valid HTML element and does not have a specific purpose

    Add your answer

    Q98. How to limit an html number input to a specific max length

    Ans.

    Use the 'maxlength' attribute in HTML to limit the number of characters in a number input field.

    • Add the 'maxlength' attribute to the input tag.

    • Set the value of 'maxlength' to the desired maximum length.

    • Example: will limit the input to 5 digits.

    Add your answer

    Q99. What is html , how we can make html website

    Ans.

    HTML is a markup language used to create the structure of a website.

    Add your answer

    Q100. Differs b/w html element and html tag

    Ans.

    HTML element is a single instance of a tag, while HTML tag is a set of markup used to define the structure of a web page.

    • HTML element is enclosed within angle brackets, e.g.

      ...

    • HTML tag consists of the opening and closing tags, e.g.

      and

    • HTML tag can contain attributes, e.g. ...

    Add your answer
    1
    2
    3
    Interview Tips & Stories
    Ace your next interview with expert advice and inspiring stories

    Interview experiences of popular companies

    3.7
     • 10k Interviews
    3.9
     • 7.8k Interviews
    3.7
     • 7.3k Interviews
    3.8
     • 5.4k Interviews
    3.7
     • 5.2k Interviews
    4.1
     • 4.9k Interviews
    3.8
     • 4.7k Interviews
    3.6
     • 3.6k Interviews
    3.6
     • 2.3k Interviews
    5.0
     • 144 Interviews
    View all
    HTML Interview Questions
    Share an Interview
    Stay ahead in your career. Get AmbitionBox app
    qr-code
    Helping over 1 Crore job seekers every month in choosing their right fit company
    70 Lakh+

    Reviews

    5 Lakh+

    Interviews

    4 Crore+

    Salaries

    1 Cr+

    Users/Month

    Contribute to help millions
    Get AmbitionBox app

    Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

    Follow us
    • Youtube
    • Instagram
    • LinkedIn
    • Facebook
    • Twitter