Basic HTML ...

Questions & Answers..

·

8 min read

1. What is HTML?

-HTML, also termed Hyper Text Markup Language is a language used on the World Wide Web. It is a common text formatting language utilized for designing and displaying web pages.

Today, text can become more dynamic and interactive because of HTML. It can change text into links, tables, and images.

And the extension of a html file is (.html)

2. What are the main features of HTML?

  • It is a markup language that allows for the creation of text-based web pages.
  • HTML is simple to use and understand.

  • While using HTML, programmers can make a web page more interactive by adding images, video, and audio.

  • HTML is platform-independent and may be used on Windows, Linux, and others.

  • It is not case-sensitive. Tags can be used in either lower or higher case.

  • HTML allows programmers to include a link on web pages, allowing readers to search for material of interest.

3. What are HTML tags, and how to use them?

-An HTML tag comprises an opening tag, a content tag, and a closing tag. Some tags aren’t closed.

Two things are contained in HTML documents: content and tags.

4. What Is the difference between HTML elements & HTML tags?

5. What Is HTML formatting?

- HTML formatting is the method of formatting text to make it look and feel better. It employs various tags to make text bold, italic, and underlined.

<p><b> This text is bold </b></p>
   <p><i> This text is italic </i></p>
   <p><u> This text is underlined </u></p>

6. Do all HTML tags have an end tag?

-No, not all HTML tags have an end tag. Some are self-closing tags that do not require an end tag.

The <br> tag, for instance, is used to break a line, and the <image> tag is used to insert an image into a page.

7. Which HTML tags are used to display the data in tabular format?

8. What are HTML attributes & how to use them?

  • All HTML elements can have attributes
  • Attributes provide additional information about elements

  • Attributes are always specified in the start tag

  • Attributes usually come in name/value pairs like: name="value

Inside the two angled brackets, attributes are specified directly after the tag’s name. They should only be used in opening or self-closing tags. They can never appear in closing tags.

9. What is the basic structure of an HTML template?


<html>

      <head>

                <title>Title of Page </title>

      </head>

      <body>Page content</body>

</html>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HTML Questions & Answers</title>
</head>
<body>
   <!--in Vs Code-->
     <!--This is called boiler plate-->
</body>
</html>

10. How many heading tags are there in HTML?

-There are basically six different types of heading tags used in HTML. Each form of heading tag has a different font size than the others.

   <h1>This is Heading 1</h1>
   <h2>This is Heading 2</h2>
   <h3>This is Heading 3</h3>
   <h4>This is Heading 4</h4>
   <h5>This is Heading 5</h5>
   <h6>This is Heading 6</h6>

-The HTML language has an anchor tag for creating a hyperlink that connects one page to another.

The HTML <a> tag defines a hyperlink.

  <a href="https://www.google.com/">Google</a>

12. What is the difference between Block Level Elements & Inline Elements in HTML?

13. What are HTML comments?

-You can add code comments to your HTML document to help you comprehend the code.

These are not visible in the browser, but they assist in notifying yourself and other developers about the purpose of a part of HTML.

 <!-- This code is commented -->
    <!-- Browser will ignore this line -->

14. What is HTML5? What are new features in it that are not available with HTML?

- HTML5 is the most recent version of the Hypertext Markup Language (HTML).

  • SVG, canvas, and other virtual vector graphics are supported by HTML5.

  • Vector graphics could only be employed with Flash, VML, or Silverlight in HTML.

  • JavaScript can now run within a web browser, thanks to HTML5.

  • HTML5 does not use SGML. It has better parsing rules for more compatibility.

  • Web SQL databases are used in HTML5 to temporarily store data.

15. What is Semantic HTML?

-Semantic HTML is a code that uses HTML markup in web pages and web apps to reinforce semantics. It also defines the meaning of the text rather than just defining its look or form.

semantic HTML gives meaning to the code that we write.

<form><table> <article>
     <!-- these tags clearly indicate the content. -->

16. How to create a nested webpage in HTML?

-A nested webpage is displayed using the HTML iframe tag. In other words, it symbolizes a webpage within a webpage. An inline frame is defined by the HTML <iframe> tag.

 <p>This is Our Web Page</p>

     <iframe src="https://www.wikipedia.com/" frameborder="0" height="200" width="300"></iframe>

-No, hyperlinks can be placed in both text and graphics. The HTML anchor tag specifies a hyperlink connecting one page to another.

18. What is a style sheet in HTML?

-A style sheet creates a uniform, transportable, and visually appealing style template. These templates can be used on a variety of web pages.

It covers the appearance and formatting of a markup-language document. The Cascading Style Sheet (CSS) is the most well-known type of style sheet, and it is used to style web pages.

19. What is an image map in HTML?

-An image map connects multiple web pages with a single image. It is represented by <map> tag. You can describe the image shapes you want to include in an image mapping.

20. What is a marquee in HTML?

-A marquee represents the scrolling text on a web page. It automatically scrolls the image or text up, down, left, or right.

You should put the text to scroll within the <marquee></marquee> tag.

21. What is a span tag in HTML? Explain with an example.

-The <span> tag is an inline container used to mark up a part of a text, or a part of a document.

  • To make text colorful

  • To give the text a background

  • Any text in a different color is highlighted.

22. What is the difference between DIV and SPAN In HTML?

-The difference between SPAN & DIV is that a SPAN element is inline and typically used for a tiny block of HTML within a line, such as within a paragraph.

A DIV or division element is a block line, comparable to having a line break before and after it.

23. Who wrote the first version of HTML?

-Tim Berners-Lee wrote the first-ever version of HTML in 1993. Since then, different versions of HTML have been introduced.

24. What is the purpose of using HTML?

-HTML can be used for various purposes, including writing code that is clear and easy to understand.

This language allows you to isolate meaning from text and style by writing descriptive and semantic code.

25. When was HTML invented?

-HTML, or Hyper Text Markup Language, was invented in 1993.

26. How to insert a picture onto a web page’s background image?

-To include a picture in the background image, place the following tag code after the </head> tag:

<body background="path.jpg">

This will make the image the background image of your web page.

27. How do you make the text on a webpage that, when clicked, sends an email?

-To do so, use the mailto command within the href tag. Convert the text into a clickable link to send an email.

 <a href=”mailto:youremailaddress@xyz.com”>Mail To</a>

28. What is the HTML layout?

-The HTML layout describes how the web page is organized. Every website has a distinct layout that helps viewers focus on specific material.

  • <header>: This tag is used to specify a document or section’s header.

  • <nav>: A container for navigation links is defined by this tag.

  • <section>: It’s used to specify a portion of a document

  • <article>: It’s a term for a self-contained, self-contained piece.

  • <aside>: It’s used to define content that’s not part of the main content (like a sidebar)

  • <footer>: This tag is used to specify a document’s or section’s footer.

29. What are empty elements in HTML?

-Empty elements are HTML elements that have no content. For example, <br>, <hr>, and so on.

30. Where is the iframe tag used?

-An inline frame is specified via the <iframe> tag. It displays a web page within a web page.

For instance, the src element specifies the URL of the document that occupies the iframe.

31. What is the difference between LocalStorage and SessionStorage objects?

32. How many types of CSS can be included in HTML?

-There are three methods for including CSS into HTML:

  • Inline - Inline CSS is used to style a specific HTML element.

  • internal - The Internal CSS has <style> tag in the <head> section of the HTML document.

  • External - In external CSS, we link the web pages to the external .css file. It is created by text editor.

     <!-- Inline CSS -->
        <p style="color:red;">Lorem ipsum dolor sit, amet consectetur adipisicing elit. Non tempore obcaecati, nam qui cum asperiores similique officiis ducimus labore exercitationem?</p>

<!-- internal Css -->
    <style>
        div{
            color: lightblue;
        }

    </style>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./style.css">
    <title>HTML Questions & Answers</title>

</head>
<body>
 <div>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Id tenetur sequi hic laboriosam eligendi ad commodi quae nam quisquam sint perferendis pariatur ratione, provident natus?</div>
</body>

div{
    font-size: 22px;
    color: green;
}

This is enough for today.

(Hinglish)

Kal baaki ka dekhege

Aur Kuch basic FAQ's..

DAY_10 27_Jan(Fri)_2023

Did you find this article valuable?

Support B1 by becoming a sponsor. Any amount is appreciated!