0% found this document useful (0 votes)
13 views1 page

HTML Basics and Key Elements Guide

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1 page

HTML Basics and Key Elements Guide

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1. What is HTML?

2. What are tags in HTML?

3. What is the difference between HTML and XHTML?

4. What are semantic HTML elements?

5. What is the purpose of the <!DOCTYPE html> declaration?

6. What are the different types of lists in HTML?

7. What is the difference between <div> and <span>?

8. What is the difference between inline, block, and inline-block elements?

9. What is the difference between <id> and <class> attributes?

10. How do you create a hyperlink in HTML?

11. What is the difference between <strong> and <b> tags?

12. What is the difference between <em> and <i> tags?

13. How do you insert an image in HTML?

14. What is the use of the alt attribute in images?

15. What is the purpose of the <meta> tag?

16. What is the role of the <head> and <body> tags?

17. How can you make a table in HTML?

18. What is the use of the <form> tag?

19. What are different input types in HTML forms?

20. What is the difference between GET and POST methods in HTML forms?

21. What is local storage and session storage in HTML5?

22. What is the use of the <canvas> element in HTML5?

23. How do you embed audio and video in HTML5?

24. What is the difference between <script>, <noscript>, and <template> tags?

25. What are some new input types introduced in HTML5?

26. What is the difference between <section>, <article>, <aside>, and <nav> tags?

27. What is a placeholder attribute?

Common questions

Powered by AI

Semantic elements delineate parts of a webpage with a specific role, improving the structural clarity of content for both developers and assistive technologies, aiding navigation and providing context for search engines .

Inline elements, like <span>, do not start on a new line and only occupy the necessary width; block elements, like <div>, take up the full available width and start on a new line; inline-block elements, such as <img>, behave like inline elements but allow for block-level properties like width and height settings .

GET method appends data to the URL, suitable for non-sensitive data and easy bookmarking but less secure as data is exposed. POST method sends data within the body of the request, better suited for sensitive data and larger payloads, providing enhanced security .

Semantic HTML elements like <article>, <nav>, and <section> clearly describe their content's role within the webpage, enhancing accessibility and SEO, while non-semantic elements like <div> and <span> do not convey any particular meaning regarding content structure .

<id> is unique within the HTML document and is used to identify a single element, which is helpful for scripting and styling, while <class> can be applied to multiple elements, making it useful for repeating styles or behaviors across various elements .

The <meta> tag provides essential meta-information about the web page, such as character set, page description, and viewport settings, which play crucial roles in SEO optimization and responsive design .

The <canvas> element provides a low-level, scriptable way to render graphics on the web, which is highly performant and integrates seamlessly with HTML5, allowing for rich, dynamic graphics without relying on external plugins like Flash .

The <!DOCTYPE html> declaration informs the web browser about the version of HTML being used, ensuring that the browser renders the page in standards mode rather than quirks mode, which follows more consistent and predictable rendering rules .

HTML is more forgiving in terms of syntax, allowing for unquoted attribute values and tag omissions, whereas XHTML is stricter, requiring proper nesting and quoting of attribute values. XHTML documents must also be well-formed XML documents .

<div> is a block-level element appropriate for larger structures and grouping multiple elements, while <span> is an inline element used for styling a part of the content within an element without disrupting its surrounding layout .

You might also like