All Exams  >   Class 3  >   HTML for Junior Classes  >   All Questions

All questions of HTML Tutorial for Class 3 Exam

What is the correct way to write a comment in HTML?
  • a)
    <!-- This is a comment -->
  • b)
    // This is a comment
  • c)
    /* This is a comment */
  • d)
    ** This is a comment **
Correct answer is option 'A'. Can you explain this answer?

Neha Shah answered
Understanding HTML Comments
HTML comments are essential for adding notes or explanations in your code without affecting the webpage's display. The correct syntax for writing comments in HTML is:
<!-- This is a comment -->
Why Option A is Correct
- Syntax Structure:
- HTML comments begin with ``.
- Everything between these markers is considered a comment and will not be rendered by the browser.
- Usage of Other Options:
- Option B (`// This is a comment`): This syntax is used for comments in JavaScript, not HTML.
- Option C (`/* This is a comment */`): This is a comment style used in CSS and JavaScript, not valid in HTML.
- Option D (` This is a comment `): This format resembles a markdown style but is not applicable in HTML.
Benefits of Using Comments
- Code Clarity:
- Comments help make the code more understandable for others or for yourself when you revisit it later.
- Debugging:
- They can be used to temporarily disable parts of the code without deleting them.
- Documentation:
- Comments can provide context about the purpose of certain sections of code.
Conclusion
Using the correct comment syntax in HTML is crucial for code organization and clarity. Always remember to use `` for effective commenting in your HTML documents.

Which entity is not defined in XML?
  • a)
    quot
  • b)
    apos
  • c)
    gt
  • d)
    copy
Correct answer is option 'D'. Can you explain this answer?

Nishanth Unni answered
Explanation:

XML:
XML stands for Extensible Markup Language. It is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. XML uses tags to define elements and attributes to provide additional information about elements.

Entities in XML:
Entities are used in XML to represent special characters or symbols that have a special meaning in XML. These entities are predefined and can be used in XML documents to represent characters that would otherwise be interpreted as markup. There are five predefined entities in XML:

1. < (less than): It represents the less than symbol "< />
2. > (greater than): It represents the greater than symbol ">".
3. & (ampersand): It represents the ampersand symbol "&".
4. " (double quote): It represents the double quote symbol '"'.
5. ' (apostrophe): It represents the apostrophe symbol "'".

Undefined Entity:
The entity mentioned in option 'D' is © (copyright). This entity is not predefined in XML and is therefore considered an undefined entity.

Usage of Undefined Entity:
If an undefined entity is used in an XML document, it will result in a parsing error. To use the copyright symbol in an XML document, you can either use the corresponding numeric character reference "©" or define the entity yourself using a Document Type Definition (DTD) or an XML Schema.

Conclusion:
In XML, the entity © is not predefined and is therefore considered an undefined entity. It cannot be used directly in an XML document without defining it first.

What should we add to a template in Dreamweaver in order to control where page content goes?
  • a)
    Editable Regions
  • b)
    HTML controllers
  • c)
    Frames
  • d)
    Content Controllers
Correct answer is option 'A'. Can you explain this answer?

Jithin Malik answered
Editable Regions in Dreamweaver Template

Editable Regions are used in Dreamweaver to control where the content goes on a web page. They are essentially designated areas on a template where content can be inserted or edited. In order to add editable regions to a Dreamweaver template, the following steps can be taken:

1. Define the template: In Dreamweaver, go to File > New > Page from Template. Then select the template that you want to edit and click on Create.

2. Identify the areas to be editable: Decide which areas of the template you want to make editable. These can be areas such as the page header, footer, or main content area.

3. Add Editable Regions: To add an editable region, select the area of the template where you want to insert the content. Then go to Insert > Template Objects > Editable Region. A box will appear where you can name the editable region.

4. Customize the editable region: Once the editable region has been added, you can customize it by changing the name or adding additional attributes such as width, height, or background color.

5. Save the template: Once you have added all of the desired editable regions, save the template. Now, when you create a new page using this template, the designated areas will be editable and you can insert or edit content as needed.

Conclusion:

In conclusion, adding editable regions to a Dreamweaver template is an essential step in controlling where the content goes on a web page. By following the steps outlined above, you can easily add editable regions to your template and create a more dynamic and flexible website.

What creates black navigation bar?
  • a)
    .navbar-inverse
  • b)
    .navbar-header
  • c)
    .navbar-form
  • d)
    .navbar-link
Correct answer is option 'A'. Can you explain this answer?

Avi Das answered
Explanation:

Creating a black navigation bar in HTML:
- To create a black navigation bar in HTML, we can use the `navbar-inverse` class provided by Bootstrap.
- The `navbar-inverse` class changes the color of the navigation bar to black.

Example:

- In the above example, we have used the `navbar-inverse` class within the `nav` element to create a black navigation bar.
- The navigation bar consists of a brand logo on the left and navigation links on the right.

Conclusion:
- By using the `navbar-inverse` class in Bootstrap, we can easily create a black navigation bar in HTML.
- This class provides a quick and efficient way to style the navigation bar according to our design requirements.

Which HTML tag is used for making character appearance bold?
  • a)
    <u>content</u>
  • b)
    <b>content</b>
  • c)
    <br>content</br>
  • d)
    <i>content</i>
Correct answer is option 'B'. Can you explain this answer?

Anjali Gupta answered
By enclosing words in the tags <b>and</b> we can make characters appear bold. <i> element is for content in italics, <u> is for underlined content, <br> is for vertical breaking.

What is the path for an image located in same folder as the current page?
  • a)
    <img src="https://cn.edurev.in/ldquo;pic.jpg”>
  • b)
    <img src="https://cn.edurev.in/ldquo;../pic.jpg”>
  • c)
    <img src="https://cn.edurev.in/ldquo;images/pic.jpg”>
  • d)
    <img src="https://cn.edurev.in/ldquo;/images/pic.jpg”>
Correct answer is option 'A'. Can you explain this answer?

Understanding the Image Path Options
When referencing an image in HTML, the path specified in the `src` attribute determines where the browser looks for the file. Let's analyze the options provided.
Option A: Correct Path
- <img src="https://cn.edurev.in/ldquo;pic.jpg">
- This option uses a full URL (absolute path) to locate the image.
- The browser will access the image directly from the specified location on the web.
Option B: Incorrect Path
- <img src="https://cn.edurev.in/ldquo;../pic.jpg">
- This option attempts to go up one directory before accessing `pic.jpg`.
- However, it is incorrectly formatted as it uses a full URL rather than a relative path.
Option C: Incorrect Path
- <img src="https://cn.edurev.in/ldquo;images/pic.jpg">
- This looks for `pic.jpg` inside an `images` folder.
- This is wrong if the image is in the same folder as the current page, making it unnecessary to specify a subdirectory.
Option D: Incorrect Path
- <img src="https://cn.edurev.in/ldquo;/images/pic.jpg">
- This option indicates an absolute path starting from the root directory.
- Again, it mistakenly assumes `pic.jpg` is located in an `images` directory instead of the same folder.
Conclusion
- The correct answer is Option A because it accurately references the image using a full URL, making it accessible without needing to navigate directories. The other options either reference incorrect paths or unnecessary directories.

Which element is design to wrap a single piece of information?
  • a)
    <time>
  • b)
    <nav>
  • c)
    <footer>
  • d)
    <header>
Correct answer is option 'A'. Can you explain this answer?

Anjali Gupta answered
<time> tag wrap single piece of information i.e. it defines date, month and year. The <nav> element identifies a set of navigation links, <footer> is introduced in HTML5 which is present at the end of page and do conatins footer information i.e copyright information.

HTML is a subset of ___________
  • a)
    SGMT
  • b)
    SGML
  • c)
    SGME
  • d)
    XHTML
Correct answer is option 'B'. Can you explain this answer?

Sparsh Chavan answered
HTML is a subset of SGML

HTML (Hypertext Markup Language) is a language used for creating and structuring web pages. It defines the structure and presentation of content on the web. On the other hand, SGML (Standard Generalized Markup Language) is a standard for defining markup languages. HTML is actually derived from SGML, making it a subset of SGML.

Understanding SGML

SGML is a markup language that provides a mechanism to define the structure and presentation of documents. It is a metalanguage, meaning it is used to define other markup languages. SGML uses a set of rules called a Document Type Definition (DTD) to define the structure and validity of documents. It is highly flexible and can be customized to suit specific requirements.

HTML as a Subset

HTML is a simplified form of SGML that is specifically designed for creating web pages. It uses a predefined set of tags and attributes to define the structure, presentation, and behavior of web content. These tags and attributes are defined in the HTML specification.

Key Points:
- HTML is a subset of SGML.
- SGML is a standard for defining markup languages.
- HTML is derived from SGML and is specifically designed for creating web pages.
- HTML uses a predefined set of tags and attributes to define the structure and presentation of web content.

Benefits of HTML being a subset of SGML

Being a subset of SGML provides several benefits to HTML:
1. Compatibility: HTML being based on SGML ensures compatibility with other SGML-based languages and tools.
2. Flexibility: SGML allows for customization and extensibility, which can be beneficial for creating specialized markup languages or adapting HTML for specific purposes.
3. Standardization: SGML provides a standard for defining markup languages, ensuring consistency and interoperability in the creation and processing of documents.
4. Accessibility: By adopting SGML principles, HTML can be designed to be accessible to different devices and platforms, making it more versatile and inclusive.

In conclusion

HTML being a subset of SGML means that it follows the rules and guidelines set by SGML while being specifically tailored for creating web pages. This relationship with SGML provides compatibility, flexibility, standardization, and accessibility benefits to HTML.

Which of the following HTML tag is used to add a row in a table?
  • a)
    <th>
  • b)
    <td>
  • c)
    <tr>
  • d)
    <tt>
Correct answer is option 'C'. Can you explain this answer?

Sahana Tiwari answered
Understanding HTML Table Structure
When creating tables in HTML, specific tags are designated for different purposes. One crucial aspect of a table's structure is the addition of rows.
Key HTML Tags for Tables
- <tr>: This tag defines a table row. It is used to group a set of table cells together horizontally.
- <th>: This tag is used for table headers. It defines header cells in a table, which are usually bold and centered by default.
- <td>: This tag defines a standard cell in a table. It contains data and is used within atag.
- <tt>: This tag is outdated and is used to define teletype text. It is not relevant to table structures.
Why <tr> is the Correct Answer
- The <tr> tag is specifically designed to add a new row to a table. Eachcan contain multipleortags that represent the individual cells in that row.
- For example, if you want to create a new row in a table, you would use thetag to initiate it and then follow withortags for the data.
Example of a Table with <tr>









Header 1Header 2
Data 1Data 2

In this example:
- The firstcreates a header row, while the secondcreates a data row.
In conclusion, the <tr> tag is essential for defining rows in a table, making option 'C' the correct choice for adding a row in HTML tables.

Who is the father of HTML?
  • a)
    Rasmus Lerdorf
  • b)
    Tim Berners-Lee
  • c)
    Brendan Eich
  • d)
    Sergey Brin
Correct answer is option 'B'. Can you explain this answer?

Rahul Goyal answered
HTML is one of the most commonly used markup languages used to create web pages. It was invented by a British computer scientist named Tim Berners-Lee in 1989 while he was working at CERN, the European Organization for Nuclear Research. Let's discuss this in more detail.

Who is Tim Berners-Lee?

- Tim Berners-Lee is a British computer scientist who is credited with inventing the World Wide Web (WWW) in 1989.
- He was born in London in 1955 and studied at Oxford University.
- He worked at CERN, the European Organization for Nuclear Research, where he developed the first web browser and web server software.

Development of HTML

- In the early days of the web, there was no standard way of creating web pages, and different browsers interpreted web pages differently.
- Tim Berners-Lee developed a markup language called HTML (Hypertext Markup Language) to create standardized web pages.
- HTML allows web developers to define the structure and content of a web page using tags and attributes.

Importance of HTML

- HTML is the foundation of the World Wide Web and is used to create almost every web page on the internet.
- It is a markup language that defines the structure and content of a web page.
- HTML tags and attributes allow developers to create headings, paragraphs, lists, links, images, and other elements on a web page.

Conclusion

In conclusion, Tim Berners-Lee is considered the father of HTML because he invented the World Wide Web and developed the first web browser and server software. He also created HTML, which is the foundation of the web and is used to create almost every web page on the internet.

Which is not a Boolean attribute?
  • a)
    Multiple
  • b)
    Novalidate
  • c)
    Formvalidate
  • d)
    Formtarget
Correct answer is option 'D'. Can you explain this answer?

Rahul Verma answered
Formtarget attribute is a Boolean attribute that must have a value that is a valid browsing context name. Multiple is a new Boolean attribute of <input> the element which specifies constraint, novalidate, and formvalidate are <form> attribute and are Boolean as well.

Which of the following is used to decode the encoded URI?
  • a)
    encodeURI()
  • b)
    encodeURIComponent()
  • c)
    decodeURI()
  • d)
    Server.URLEncode()
Correct answer is option 'C'. Can you explain this answer?

DecodeURI()

The correct option to decode an encoded URI is the decodeURI() function. This function is used to decode a Uniform Resource Identifier (URI) that has been previously encoded using the encodeURI() function.

EncodeURI() and encodeURIComponent()

The encodeURI() function is used to encode a complete URI, while the encodeURIComponent() function is used to encode specific components within a URI. These functions are used to convert special characters and non-ASCII characters into a format that is safe for use within a URI.

Usage

When a URI is encoded using encodeURI() or encodeURIComponent(), certain characters are replaced with escape sequences. For example, spaces are replaced with " ", and special characters like "&", "=", and "?" are replaced with their respective escape sequences ("&", "=", and "?" respectively). This encoding is necessary to ensure that the URI remains valid and can be properly interpreted by web browsers and servers.

However, if you want to retrieve the original URI from its encoded form, you need to use the decodeURI() function. This function reverses the encoding process, converting the escape sequences back into their original characters.

Example

Let's say we have an encoded URI: "https://www.example.com/search?q=アプリ". This URI has been encoded using the encodeURIComponent() function, and the Japanese characters have been replaced with their escape sequences ("アプリ").

To decode this URI and retrieve the original characters, we can use the decodeURI() function. The result would be: "https://www.example.com/search?q=アプリ".

Conclusion

In summary, the decodeURI() function is used to decode an encoded URI and retrieve the original characters. It is the correct option to use when decoding a URI that has been previously encoded using the encodeURI() or encodeURIComponent() functions.

What application can one create even before the introduction of HTML5?
  • a)
    Web applications
  • b)
    Mobile applications
  • c)
    Forms
  • d)
    Browser based games
Correct answer is option 'C'. Can you explain this answer?

Forms can be created even before the introduction of HTML5
Forms have been a fundamental part of the web since its inception. Even before the introduction of HTML5, developers were able to create forms using earlier versions of HTML.

HTML bullet points on creating forms:
- In the early days of the web, forms were created using HTML elements such as
, ,

Which of the following is not sectioning elements?
  • a)
    <article>
  • b)
    <aside>
  • c)
    <nav>
  • d)
    <header>
Correct answer is option 'D'. Can you explain this answer?

Rahul Verma answered
The <section> element represents a section of a document or application. Tags like <article>, <aside>, <nav>, <section> are the ones that create a nested, new outline inside the page.

Which of the following is not sectioning elements?
  • a)
    <article>
  • b)
    <aside>
  • c)
    <nav>
  • d)
    <header>
Correct answer is option 'D'. Can you explain this answer?

Understanding Sectioning Elements
Sectioning elements in HTML are used to define the structure of a document by breaking it into meaningful sections. They help in organizing content, making it easier to understand and navigate.
List of Sectioning Elements
The following elements are considered sectioning elements:
-
: Represents a self-contained composition that can be distributed independently.
-

Border-spacing is given in _____________
  • a)
    Pixels
  • b)
    cm
  • c)
    mm
  • d)
    inch
Correct answer is option 'A'. Can you explain this answer?

Bijoy Singh answered
Border-spacing is given in Pixels.

Explanation:
-------------------

HTML provides various attributes and properties to control the layout and spacing of elements on a web page. One of these properties is "border-spacing", which is used to specify the space between the borders of adjacent table cells.

The "border-spacing" property is used in conjunction with the "border-collapse" property, which determines how the borders of adjacent cells are displayed. When "border-collapse" is set to "collapse", the value of "border-spacing" is ignored.

The "border-spacing" property accepts a length value, which can be specified in different units such as pixels, centimeters, millimeters, or inches. However, the correct answer for this question is pixels.

Pixels (px) is a unit of measurement commonly used in web development. It represents a single dot on a computer screen. The advantage of using pixels for specifying "border-spacing" is that it provides a consistent and predictable spacing regardless of the user's screen size or resolution.

Other units of measurement like centimeters (cm), millimeters (mm), or inches (in) are absolute units and may not provide the desired spacing on different devices or screens. Using pixel values ensures that the spacing remains consistent and visually appealing across different devices and screen sizes.

In conclusion, the correct unit of measurement for specifying "border-spacing" is pixels (px). This ensures consistent and predictable spacing between the borders of adjacent table cells on various devices and screen sizes.

Which element does not support form attribute?
  • a)
    <input>
  • b)
    <output>
  • c)
    <meta>
  • d)
    <button>
Correct answer is option 'C'. Can you explain this answer?

Anjali Gupta answered
The new form attribute is for <input>, <select>, <textarea>, <button>, <output> and <fieldset>. One can place these elements anywhere on the page.

What is the correct syntax of doctype in HTML5?
  • a)
    <!doctype html>
  • b)
    <doctype html!>
  • c)
    <doctype html>
  • d)
    </doctype html>
Correct answer is option 'A'. Can you explain this answer?

Anjali Gupta answered
The correct syntax of HTML5 doctype is <!doctype html>, doctype is the very first thing to write in HTML5. <!doctype html> or <!DOCTYPE HTML> both are same because ‘doctype’ keyword is not case sensitive.

Which property specifies the output path in compiled CSS?
  • a)
    sass_dir
  • b)
    output_style
  • c)
    relative_assets
  • d)
    line_comments
Correct answer is option 'C'. Can you explain this answer?

Bhavya Bose answered
Understanding the Output Path in Compiled CSS
When it comes to configuring Sass, several properties are important for controlling how styles are compiled into CSS. One of these properties is crucial for determining where the output CSS files are placed after compilation.
Key Property: relative_assets
- The correct answer is option 'C' - relative_assets.
- This property specifically controls how asset paths are resolved relative to the output CSS file.
Role of relative_assets
- When set to true, `relative_assets` allows the Sass compiler to generate relative paths for assets like images or fonts, making it easier to manage and link resources, especially in complex projects.
- It helps in ensuring that the paths to images or other assets are correct when the CSS is served from a different location.
Other Options Explained
- sass_dir: This property specifies the directory where your Sass files are located. It does not control the output path of the compiled CSS.
- output_style: This property defines how the compiled CSS is formatted (e.g., expanded, nested, compact, or compressed) but does not affect the output path.
- line_comments: This option controls whether line comments are included in the output CSS, which helps with debugging but is not related to output paths.
Conclusion
In summary, the `relative_assets` property is essential for defining how the CSS file interacts with other resources in relation to its output path. Understanding this property allows developers to create well-structured and easily maintainable stylesheets.

What is DOM in HTML?
  • a)
    Language dependent application programming
  • b)
    Hierarchy of objects in ASP.NET
  • c)
    Application programming interface
  • d)
    Convention for representing and interacting with objects in html documents
Correct answer is option 'D'. Can you explain this answer?

Atharva Saini answered
The correct answer is option 'D': DOM stands for Document Object Model, which is a convention for representing and interacting with objects in HTML documents.

The Document Object Model (DOM) is a programming interface for web documents. It represents the structure of an HTML or XML document as a tree-like model, where each node in the tree represents a part of the document, such as an element, attribute, or text. The DOM provides methods and properties to manipulate and traverse this tree structure, allowing developers to dynamically update and interact with the content of a web page.

The DOM is language-independent, meaning it can be accessed and manipulated using various programming languages such as JavaScript, Python, or Java. In the case of HTML, the DOM represents the structure and content of an HTML document, allowing developers to access and modify elements, attributes, and text within the document.

HTML Bullet Points:

1. Document Object Model (DOM):
- Convention for representing and interacting with objects in HTML documents.
- Represents the structure of an HTML or XML document as a tree-like model.

2. Tree-like Structure:
- Each node in the tree represents a part of the document (element, attribute, text).
- Nodes are interconnected through parent-child relationships.

3. Manipulating the DOM:
- Provides methods and properties to manipulate and traverse the tree structure.
- Allows developers to dynamically update and interact with the content of a web page.

4. Language Independence:
- Can be accessed and manipulated using various programming languages.
- JavaScript is commonly used for DOM manipulation in web development.

5. Accessing and Modifying Elements:
- Through the DOM, developers can access and modify HTML elements, attributes, and text.
- This allows for dynamic updates and interactivity on web pages.

In conclusion, the DOM is a vital component of web development as it enables developers to interact with and manipulate the structure and content of HTML documents. By using the DOM, developers can create dynamic and interactive web pages.

Which element is used to get highlighted text in HTML5?
  • a)
    <highlight>
  • b)
    <b>
  • c)
    <mark>
  • d)
    <u>
Correct answer is option 'C'. Can you explain this answer?

Neha Shah answered
Understanding the <mark> Element in HTML5
The correct answer to the question about highlighting text in HTML5 is option 'C': <mark>. This element is specifically designed to indicate text that has been highlighted or marked for reference. Let's explore its significance and usage.
Purpose of the <mark> Element
- The <mark> element is used to highlight parts of text that are of special interest or relevance in the context of the content.
- It visually distinguishes the highlighted text by applying a yellow background color, making it stand out from the surrounding content.

Usage in HTML5
- To use the <mark> element, simply wrap the desired text within the tags. For example:
This is a highlighted text example.


- This markup will render the word "highlighted" with a background color, emphasizing its importance.
Comparison with Other Elements
- Other options like <b> (bold), <u> (underline), and <highlight> (not a valid HTML tag) do not serve the same purpose as <mark>.
- While <b> makes text bold and <u> underlines it, they do not convey the idea of highlighting for emphasis or relevance.
Conclusion
- In summary, the <mark> element is essential for indicating highlighted text in HTML5, making it the appropriate choice for emphasizing important information within content.

Borders can’t be applied on ________________
  • a)
    <th>
  • b)
    <td>
  • c)
    <tr>
  • d)
    <thead>
Correct answer is option 'C'. Can you explain this answer?

Rahul Verma answered
Borders can’t be applied on <tr> elements. It can’t be applied on table structural elements. For setting borders with <tr> element, border-collapse property should be set to collapse.
Syntax is 
table {border-collapse: collapse;} 
th, td{border-bottom: 2px dotted red; } 
tfoot tr:last-child td{border-bottom: 9 px;}

What application can one create even before the introduction of HTML5?
  • a)
    Web applications
  • b)
    Mobile applications
  • c)
    Forms
  • d)
    Browser based games
Correct answer is option 'C'. Can you explain this answer?

Anjali Gupta answered
With the help of HTML5 and JavaScript it became possible to create excellent mobile applications, browser based games, web applications and many more other applications. Forms were already introduced before HTML5.

Which entity is for the arrow?
  • a)
    &crarr
  • b)
    &zeta
  • c)
    &upsih
  • d)
    &oelig
Correct answer is option 'A'. Can you explain this answer?

Jithin Iyer answered
There is not enough information provided to determine which entity is for the arrow. Can you please provide more context or clarify your question?

Which of the following is not the element associated with HTML table layout?
  • a)
    size
  • b)
    spanning
  • c)
    alignment
  • d)
    color
Correct answer is option 'D'. Can you explain this answer?

Explanation:

The correct answer is option D, color.

HTML Table Layout:
HTML tables are used to organize and display data in a structured format. Tables consist of rows and columns, where data is placed inside table cells.

Elements associated with HTML table layout:
a) Size: The size attribute is used to specify the width of a table or a table cell. It can be set in pixels, percentages, or as a relative value.
Example: ``

b) Spanning: The colspan and rowspan attributes are used to specify how many columns or rows a table cell should span. This allows for merging cells horizontally or vertically.
Example:
```


```

c) Alignment: The align attribute is used to specify the horizontal alignment of the content within a table cell. It can be set to left, right, center, or justify.
Example: ``

Why color is not an element associated with HTML table layout:
d) Color: The color attribute is not directly associated with HTML table layout. However, it can be applied to the text or background of table cells using CSS. The color property is used to specify the color of the text, while the background-color property is used to specify the color of the cell background.
Example:
```


```

While color can be applied to table cells, it is not a specific element or attribute associated with HTML table layout. The primary elements associated with table layout are size, spanning, and alignment.
This cell spans two columnsThis cell spans three rowsCenter aligned contentRed textYellow background

Relative URLs are used to ____________
  • a)
    link other pages within the same site
  • b)
    link the same page with other sites
  • c)
    link other pages with other sites
  • d)
    does not link
Correct answer is option 'A'. Can you explain this answer?

Rahul Goyal answered
Relative URLs are used to link other pages within the same site. Let's understand this concept in detail.

What are URLs?
URL stands for Uniform Resource Locator. It is the address that identifies a particular resource on the internet. URLs are used to navigate and access web pages, files, and other resources.

What are relative URLs?
Relative URLs are a type of URL that specifies the location of a resource relative to the current page or file. It is a path that is relative to the current location rather than an absolute path that specifies the complete address of a resource.

Advantages of relative URLs:
Relative URLs offer several advantages when it comes to linking pages within the same site:

1. Flexibility: Relative URLs allow for flexibility when moving or restructuring a website. If the structure of the site changes, the relative URLs will still work as they are based on the relative path from the current page.

2. Portability: Relative URLs make it easier to transfer or duplicate a website to a different domain or server. The links will adapt to the new location without needing to be updated.

3. Maintainability: With relative URLs, it is easier to manage and maintain a website. If a page needs to be renamed or moved to a different folder, only the relative link needs to be updated, rather than every single link on the site.

Examples of relative URLs:
Relative URLs are specified using relative path notations. Here are some examples:

- Linking to a page in the same directory: If the current page is "example.com/about.html" and you want to link to "example.com/contact.html", the relative URL would be "contact.html".

- Linking to a page in a subdirectory: If the current page is "example.com/products.html" and you want to link to "example.com/products/category.html", the relative URL would be "category.html" or "products/category.html".

- Linking to a page in the parent directory: If the current page is "example.com/products/category.html" and you want to link to "example.com/products.html", the relative URL would be "../products.html".

In conclusion, relative URLs are used to link other pages within the same site. They provide flexibility, portability, and maintainability to the website structure, making it easier to manage and update links.

Relative URLs are used to ____________
  • a)
    link other pages within the same site
  • b)
    link the same page with other sites
  • c)
    link other pages with other sites
  • d)
    does not link
Correct answer is option 'A'. Can you explain this answer?

Anjali Gupta answered
Relative URLs are used for linking other pages within the same site. These are the shorthand version of absolute URLs. It does not need a domain name. These URLs are helpful when building a site on a computer because we can create links between pages without having set up for hosting or domain name.

Which of the following opens linked document in full body?
  • a)
    _blank
  • b)
    _top
  • c)
    _parent
  • d)
    framename
Correct answer is option 'B'. Can you explain this answer?

Rahul Verma answered
_parent opens linked document in parent frame, _top opens the linked document in full body of the window, framename opens the linked document in a named frame,
e.g. <a href= https://www.sanfoundry.com/ target= “_parent”> Visit The site !! </a>.

Footer element can’t contain ____________ information.
  • a)
    contact information
  • b)
    copyright information
  • c)
    the author of the document
  • d)
    blog post
Correct answer is option 'D'. Can you explain this answer?

Tarun Kumar answered
Contain copyright information, contact information, site navigation links, social media icons, privacy policy links, and other relevant information.

For heading we can use ____________
  • a)
    <td>
  • b)
    <tr>
  • c)
    <thead>
  • d)
    <th>
Correct answer is option 'D'. Can you explain this answer?

Shounak Khanna answered
Explanation:

Heading in HTML:
- Heading tags in HTML are used to define headings for a webpage.
- The <th> tag is used to define a header cell in an HTML table.
- The content inside the <th> tag is typically displayed in bold and centered.
- Headings are important for structuring content and improving accessibility for users.
- In this case, option 'D' (<th>) is the correct choice for defining a heading in HTML.

Chapter doubts & questions for HTML Tutorial - HTML for Junior Classes 2025 is part of Class 3 exam preparation. The chapters have been prepared according to the Class 3 exam syllabus. The Chapter doubts & questions, notes, tests & MCQs are made for Class 3 2025 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests here.

Chapter doubts & questions of HTML Tutorial - HTML for Junior Classes in English & Hindi are available as part of Class 3 exam. Download more important topics, notes, lectures and mock test series for Class 3 Exam by signing up for free.

HTML for Junior Classes

14 videos|31 docs|24 tests

Top Courses Class 3