L
LLLOS.ai
Learn
L

Chapter 7 — HTML – Advanced Features

Class 7 · Computer Studies

Overview

This unit explores advanced features of HTML that go beyond basic page structure. Students will learn semantic elements that make pages meaningful, interactive controls with forms and many input types, ways to present complex tabular data, and how to embed media such as images, audio and video. The unit introduces vector graphics (SVG) and the HTML canvas for drawing, plus the iframe element for embedding external content. Students will study meta tags for page information, linking and using external resources, and simple techniques for responsive design so pages work on phones and tablets as well as desktops. Practical skills include creating accessible forms, validating input, controlling multimedia playback, and organising content with semantic tags for better readability and search friendliness. These features matter because modern websites are interactive, device-independent and must work for people with different needs and devices. Understanding advanced HTML helps students build richer web pages, improves their logical thinking about page structure, and prepares them for learning CSS and JavaScript later. The unit emphasises good practices such as using the right element for the job, providing alternative text, and testing pages in different screen sizes. Students will complete short projects and practice questions that mirror real-school assessment styles to build confidence and competence.

Learning Objectives

  • Describe the purpose of semantic HTML elements and use them correctly in a page.
  • Create and validate forms using various input types and attributes for better user input.
  • Format and present complex tabular data with advanced table tags and accessibility features.
  • Embed images, audio and video using appropriate elements and provide fallback content.
  • Draw simple graphics using SVG and the canvas element and explain when to use each.
  • Use meta tags, favicons and link elements to add page information and resources.
  • Embed external content safely using iframes and explain sandboxing basics.
  • Apply simple responsive design techniques so pages display well on different devices.
  • Explain and use basic client-side storage methods for preserving small amounts of data.

Topics in this chapter

13 topics · tap a topic title to jump straight to it.

💻1

Semantic HTML and Page Structure

What are semantic elements and why they matter
Semantic elements are tags that carry meaning about the content they contain. Using elements that describe structure, such as header, nav, main, article, section, aside and footer, helps readers, browsers and assistive technologies understand the purpose of each part of the page. When you label parts of a page with meaningful tags, search engines can index the important parts and screen readers can provide faster navigation to users who rely on them. Good structure also makes a web page easier for another student or developer to read and update.

Start page design by planning the content areas: what belongs in the header, which links form the navigation, which pieces are the main articles, and what information is supplementary. Then mark those parts with semantic tags rather than using many generic containers. This does not change how the page looks by itself; CSS controls presentation. Semantic HTML is about clarity and correctness of structure, not styling.

Follow a few simple rules: keep headings in order so the document outline is logical, place the primary content inside a main element, and use article for self-contained pieces that could be shared on their own, for example a news item or a blog post. Use aside for related notes such as author bios or side information. Use footer for contact details, legal notices or links that appear at the end of the document or a section. If a section is independent, give it a heading so it forms its own part of the outline.

Teaching practice includes converting a div-heavy page into semantic markup, checking how the document outline looks, and testing with a screen reader or browser tools that show structure. Explain that semantic choices improve accessibility and maintainability, and form a strong foundation for later CSS and JavaScript lessons.

📌 Examples
  • Create a simple page with header, nav, main, and footer to organise content.
  • Mark a blog post with article and include author and date inside the footer of the article.
📊 Visual ideas
A block diagram showing a page divided into header, navigation at the top, main content area with article and aside, and footer at the bottom.
💻2

Headings, Sections and Document Outline

Headings build the document outline
Headings are the skeleton of a page. Use h1 for the main page title and then h2, h3 and so on in descending order for subtopics. This creates a clear outline that helps everyone who reads the page. Assistive technologies rely on headings to let users jump quickly to the section they want, and search engines use headings to find important topics. A correct sequence of headings makes long pages easier to scan and understand.

Sections are groups of related content. Elements such as section and article act as containers for content that belongs together. Each such section should normally start with a heading that names the topic. For example, a school resources page might use h1 for the subject, h2 for chapters and h3 for individual lessons. Maintain a logical hierarchy so that headings reflect the true nesting of content; do not skip from h1 to h4 without intermediate levels unless there is a special reason.

A document outline is the map of the page created by headings and sectioning elements. You can make an internal table of contents by linking to headings using id attributes; this is useful for revision notes or long guides. When designing a page, think about how a visitor will scan the page: short, descriptive headings are better than long sentences. Keep headings focused and meaningful so users understand what each section contains at a glance.

Avoid using heading tags purely for visual size; style non-heading text with CSS instead. For decorative captions and labels use span or p and apply styles. When working on exercises, practice reorganising content into clear sections with headings and then create a small table of contents linking to those headings. These habits improve readability and accessibility, and prepare students for writing structured documents and web applications in higher classes.

📌 Examples
  • Make a study notes page with h1 for subject, h2 for chapters and h3 for topics.
  • Add id attributes to h2 headings and make a table of contents with links to each id.
📊 Visual ideas
A nested outline tree showing H1 at top, then multiple H2 nodes each with H3 children to represent sections and subsections.
💻3

Advanced Tables: captions, colspan, rowspan and accessibility

Using tables for structured data
Tables are the correct choice when information naturally fits into rows and columns, for example timetables, marksheets or price lists. A basic table uses a table element with rows marked by tr and cells by th for headers and td for data cells. For clarity add a caption that gives a short title for the table; this helps everyone understand what the data shows. Captions are read first by assistive tools and appear in printouts.

Complex tables often require merging cells. Use colspan to have a cell span several columns and rowspan to span multiple rows. For example, in a timetable a subject that covers two consecutive periods can be represented by a td with colspan="2" so the schedule remains clear. Use thead, tbody and tfoot to group the header, body and footer of the table which makes styling and understanding easier. Keep headers descriptive and use scope attributes to define whether a header applies to a row or a column so screen readers can announce the table correctly.

Accessibility and mobile display need attention. For wide tables consider horizontal scrolling or reflowing data into stacked lists on small screens. Avoid using tables for page layout; they should describe data only. When preparing tables for school tasks, practise adding a caption, grouping headings, and using proper scope. Also include a short summary or clear heading text near the table if necessary to explain complex arrangements.

Styling should be in CSS, not by adding visual-only attributes to the HTML. Test tables by reading them with a screen reader or using browser accessibility tools to ensure header relationships are clear. Teaching activities include building a class timetable with colspan and rowspan, and creating a marksheet with thead, tbody and tfoot to show totals and averages in the footer row.

📌 Examples
  • Create a school timetable table using colspan to show double-period slots.
  • Build a marksheet table with thead, tbody, tfoot and use scope attributes on headers.
📊 Visual ideas
A table sketch showing header row with colspan and a left column using rowspan to label grouped rows.
💻4

Forms: structure, labels, fieldsets and accessibility

Forms collect information in a structured way
Forms are how users give information to a website. The form element groups controls like inputs, selects and textareas. Important form attributes include action, which names where data would be sent, and method, which indicates how. In class we focus on form structure and accessibility rather than server processing. Every input should have a descriptive label. Labels connect to inputs using the for attribute matched to the input id or by wrapping the input. Labels make forms usable for people who click or tap and for those using screen readers.

Grouping related controls with a fieldset and using a legend gives context to a set of related options, such as contact details or preferences. This helps keyboard users and assistive technologies understand the purpose of the group. Use placeholders for short hints but do not rely on them as the only explanation; placeholders disappear when the user types and cannot replace a label. Required fields can be marked with the required attribute so browsers show a quick warning if the user tries to submit without filling them.

Always ensure a logical tab order by placing controls in the expected sequence in the HTML. Provide clear submit and reset buttons and short help text when needed. For checkboxes and radio buttons, group related choices and make a single label explain the group; label each option clearly. Test forms using only the keyboard and with a screen reader if possible to find accessibility problems.

Practical work includes building a contact form with name, email and message fields, adding labels and a fieldset for options. Discuss privacy: explain why forms that collect personal data should display a short note about how the information will be used. These habits build good, accessible web forms that work for as many people as possible.

📌 Examples
  • Build a contact form with labels for name, email, message and a required attribute on email.
  • Group gender radio buttons inside a fieldset with a legend for accessibility.
📊 Visual ideas
A diagram of a form showing labels connected to inputs and a submit button at the bottom.
💻5

Input Types and Attributes: choosing and tuning controls

Pick the right input type for better data entry
The type attribute of an input helps the browser show the correct control and do simple validation. Types include text, password, email, number, date, tel, url and file. Choosing type="email" for email addresses lets browsers check for an @ symbol and shows a suitable keyboard on phones. type="number" gives small step controls and supports min, max and step attributes to restrict allowed values. The date type often provides a calendar picker which makes date entry easier and less error-prone.

Use attributes to tune behaviour. maxlength limits characters; minlength enforces a minimum; placeholder gives a short hint but should not replace labels; required prevents empty submissions. For number and date inputs use min and max to define sensible ranges such as an age limit between 5 and 18. The pattern attribute allows simple checks using regular expressions for formats like PIN codes. The file input supports accept to restrict file types and multiple to allow several files to be chosen at once.

Remember that input types and attributes provide friendly, client-side assistance but are not secure by themselves. Server-side checks are still required. Also check how inputs behave on different devices: mobile keyboards vary and some features are not supported in older browsers. When designing forms, think about user convenience: prefer input types that reduce typing and use default values where useful.

Hands-on exercises will let students try different input types and attributes and observe differences in behaviour. Students will learn why selecting the correct input type reduces mistakes and makes forms faster to fill, especially on mobile devices.

📌 Examples
  • Create a registration form using email, number (with min and max), and date inputs with required attributes.
  • Make a file upload control accepting only images and allowing multiple selection using accept and multiple.
📊 Visual ideas
A sketch showing different input boxes labeled with their types and example values, like an email field with @ symbol.
💻6

Form Validation and Friendly Feedback

Validation improves data quality and user experience
Validation ensures that the information entered into a form meets the rules you expect. HTML input attributes provide simple client-side validation: required prevents empty fields; type="email" checks basic email format; minlength and maxlength control length; pattern enforces a simple format such as digits only. These checks give fast feedback to the user and reduce server work by catching common mistakes before submission.

However, client-side validation is only a convenience. It can be bypassed, so server-side validation is essential for security. Teach that client-side checks help users correct errors quickly while server checks protect the data and the application. Explain common validation steps: check mandatory fields first, then check formats and ranges, and finally clean or escape text before using it on the server.

User-friendly feedback matters. When a field is invalid, show a clear message close to the field and highlight the field so the user can fix it. Preserve already entered information so users do not need to retype everything. Use descriptive messages like "Enter a 6-digit PIN" rather than generic phrases. For patterns, give an example of a valid value so learners understand the expected format.

For class activities, practise adding validation attributes to form controls and testing them by entering wrong values. Also show the use of novalidate on the form to disable built-in checks when you need custom handling. These exercises teach students how to combine browser features and good messages to make forms both helpful and secure.

📌 Examples
  • Use required and pattern to ensure a 6-digit PIN input accepts only digits and exactly six characters.
  • Set min and max on a number input for age between 5 and 18 and test behaviour when entering out-of-range values.
📊 Visual ideas
A flow diagram showing a form submission attempt leading to either validation errors shown back to the user or successful submission.
💻7

Images: embedding, alt text, captions and responsive images

Images support meaning and visual interest
Images are added with an img element. Always include alternate text that briefly describes the image; this helps users who cannot see the image and appears when the image fails to load. For decorative images that add no information, an empty alt attribute tells assistive tools to skip them. Use figure and figcaption concepts in your planning to pair images with short explanatory captions so readers understand why the image is shown.

Responsive images help pages load quickly on different devices. The srcset and sizes attributes let the browser choose the most suitable image file for the device resolution and screen width. Another method is to set images to scale with CSS using max-width:100% so they reduce to the container width on small screens. Reserving space with width and height attributes or CSS avoids content jumping as images load.

Optimise images before adding them to pages. Choose suitable file formats such as compressed images for photos and simple vector-based or PNGs for illustrations. Reduce file dimensions to what is needed on the page to save data for mobile users. Test images on phones and tablets to check clarity and loading speed. For accessibility, provide longer descriptions or transcripts nearby if an image presents important data such as a chart.

Class exercises include adding images with meaningful alt text, creating a simple figure with a caption, and practicing responsive techniques so images scale properly. These practices result in faster pages that remain accessible to more users and devices.

📌 Examples
  • Add an image with alt text describing a school building and include width and height attributes.
  • Use srcset with two image files so the browser selects a smaller image on narrow screens.
📊 Visual ideas
A diagram showing three device widths and the browser choosing different image files from the srcset list.
💻8

Audio and Video: embedding, controls and accessibility

Multimedia enriches learning but needs care
Audio and video elements allow sound and moving pictures to play inside a web page. Use the audio and video elements and include controls so users can play, pause and adjust volume. Provide source files in more than one format where possible so different browsers can play at least one. Always include a short text fallback inside the element explaining the content when media cannot play.

Accessibility is important. Provide captions or subtitle files for videos so people with hearing loss can follow along. Captions can be added with a track element that references a caption file. Also include a transcript of the audio or video content for students who prefer to read or for search engines to index content. Avoid autoplay with sound because many browsers block it and it can disturb users; if autoplay is needed, use muted and inform users.

Consider file size and performance: compress audio and video to an appropriate quality and use short clips for demonstrations. Control the display size with width and height or CSS so the player fits the page layout. Provide simple play and pause controls near the media if required and label them so screen reader users can find them.

Hands-on activities include embedding a short audio announcement with controls and adding a transcript, and embedding a video with two source formats and captions. These exercises teach how to include multimedia that works well, loads quickly and remains accessible to more learners.

📌 Examples
  • Embed an audio file with controls and provide a short transcript below the player.
  • Insert a video with two source files in different formats and add a caption track for subtitles.
📊 Visual ideas
A sketch of a video player with play/pause button, progress bar, volume control and caption toggle.
📈9

Canvas and SVG: when to use pixel and vector graphics

Two ways to draw on the web
Canvas and SVG are two different technologies for drawing. Canvas provides a pixel drawing surface controlled by script. It is ideal for animations, games and many-pixel dynamic scenes. Because canvas is pixel-based, drawings are made by painting pixels and may lose quality when scaled. For Class 7 we learn the concept and simple examples: drawing rectangles, circles and clearing the surface. Canvas content needs a textual description outside the canvas for accessibility.

SVG is an XML-based way to describe shapes such as rectangles, circles, lines and paths. Because it is vector-based, SVG scales without losing sharpness and its elements remain part of the document structure. This makes SVG good for logos, icons and diagrams that must stay crisp at many sizes. Elements inside an SVG can have titles and descriptions which help screen readers and search engines. You can style SVG with CSS and change parts with scripts for simple interactivity.

Choose SVG when you need sharp scalable graphics and when elements need to be accessible or interactive without many pixels. Choose canvas for fast pixel drawing and games. Teach students to provide alternate text or a separate description for canvas and to add title or desc for SVG. Practice tasks include making a small SVG logo with simple shapes and using a prepared script to draw a rectangle and a circle on canvas to see how parameters affect the result.

Understanding the difference between canvas and SVG helps students pick the right tool for their projects and prepares them for later lessons that combine graphics with interactivity using code.

📌 Examples
  • Create a small SVG logo with a circle and two rectangles and add a title element for accessibility.
  • Use a small script to draw a filled rectangle and a stroked circle on a canvas element.
📊 Visual ideas
A labelled rectangle representing the canvas element with coordinates (0,0) at top-left and example shapes drawn inside.
👑10

Meta Tags, Favicons, Linking and Head Information

Information for the browser and search engines
The head part of an HTML page holds information that helps the browser and services understand the page. Meta tags provide metadata such as character set, description and viewport. The charset meta tag ensures correct character display. The viewport meta tag tells mobile browsers how to scale the page and is essential for responsive behaviour. A clear meta description helps search engines and social sites show a helpful summary under the page title.

Favicons are small icons shown in browser tabs and bookmarks. Add a link element that points to the icon file so the page has a recognisable symbol. Link elements also include stylesheets by using rel="stylesheet" and can preconnect to important resources to speed loading. Place these tags in the head so the browser finds them before rendering the page body.

Explain the difference between metadata that affects behaviour (for example viewport) and metadata used by services (for example description and keywords). Teach students to write short, useful descriptions for pages and to include an author meta tag when appropriate. Also practise linking to an external stylesheet and understand why separating style from content is good practice.

Class tasks include adding charset and viewport meta tags, linking a stylesheet and a favicon, and writing a short meta description for a page about a school event. These steps make pages more professional, discoverable and friendly to mobile users.

📌 Examples
  • Add meta charset and viewport tags and link a stylesheet and favicon in the head of a simple HTML page.
  • Write a short meta description for a page about the school science fair.
📊 Visual ideas
A labelled head section diagram showing meta charset, viewport, title, link to stylesheet and link to favicon.
💻11

Iframes and Embedding External Content Safely

Embedding content from other sites
The iframe element lets you show another web page inside your page. It is useful for embedding maps, videos or other widgets. Use the src attribute to point to the URL and set width and height so the frame fits your layout. Because iframes load external content, they can bring privacy and security concerns: the embedded page may run scripts or send requests.

To reduce risk use the sandbox attribute which restricts actions inside the iframe, for example blocking scripts or form submission unless explicitly allowed. Always add a title attribute to describe the content to screen reader users. Avoid embedding untrusted pages or allowing many large iframes on a single page since they slow loading and may not behave well on small screens.

If a service provides an embed code, check whether it is trusted and whether it allows sandboxing. Consider linking to the external page instead of embedding when interaction is not needed. Also keep in mind that embedded content may not be accessible to all users; provide an alternative link and description so everyone can reach the same information.

Practice embedding a public, safe resource inside an iframe with a descriptive title and sandbox attribute and then describe why sandboxing was chosen. These exercises teach students to balance convenience and safety when using content from other websites.

📌 Examples
  • Embed a public map in an iframe with a title and sandbox attribute and test it in the browser.
  • Embed a public video using iframe code and explain why a sandbox may be useful for other types of content.
📊 Visual ideas
A diagram showing a page with an iframe box and arrows indicating external content loaded into the frame with width and height.
💻12

Responsive Design Basics and Simple Techniques

Make pages adapt to different screens
Responsive design means pages work well on small phones, tablets and large desktop screens. The first step is the viewport meta tag which tells mobile browsers to use the device width. After that, use flexible layouts and relative units so elements can grow or shrink. Avoid fixed pixel widths for main layout containers; prefer percentages or other relative units so the layout adapts.

Structure the HTML to stack content vertically on narrow screens; semantic layout helps this process. Images should be responsive by using techniques that let them scale to the container, for example setting max-width to 100% so they reduce on small screens. Navigation that is horizontal on a wide screen can become a vertical stacked list for mobile users to avoid overflow and small clickable areas.

Although full media queries are part of CSS, teach the concept in class: different rules can apply depending on screen width. For Class 7 practice simple CSS rules such as switching from two columns to a single column at a given width. Test pages by resizing the browser window and using device tools in the developer console to simulate phones and tablets.

Focus on readable font sizes, large enough touch targets, and adequate spacing. These simple responsive practices make web pages accessible to more users and devices and prepare students to learn CSS techniques for more advanced responsiveness later.

📌 Examples
  • Create a two-column layout using percentages that becomes one column when the browser width is small.
  • Make images scale by setting their CSS max-width to 100% and height to auto.
📊 Visual ideas
A side-by-side sketch showing a wide screen layout with two columns and a narrow screen layout with the same sections stacked vertically.
📊13

Local Storage and Simple Client-side Data

Saving small bits of information on the device
Local storage is a browser feature that lets a web page save simple key-value pairs on the user's device. It is useful for saving non-sensitive preferences, such as a chosen theme colour or the last page a student viewed. The data remains until it is cleared by the user or by code, so it can be used to remember settings between visits. Local storage is not part of HTML itself but works with web pages and is simple to use with a little script.

Teach the idea without deep programming: explain that values are stored as text using a key, for example storing a theme as 'dark' under the key 'theme'. Show how reading a stored value when a page loads can restore the user's preferences. Emphasise that local storage should never hold passwords or private information because it is not encrypted and can be read by scripts on the same site.

Compare local storage briefly with cookies: cookies can be sent to the server on each request, while local storage stays only in the browser. This makes local storage convenient for client-only settings but unsuitable for server-based authentication. Also show simple management actions: set an item, get an item, remove an item and clear all items.

Class exercises include using a prepared script to save a background colour choice and applying it on page load, and showing how to clear stored data. These activities give a simple, practical introduction to client-side storage that students can use safely for personalisation features in their projects.

📌 Examples
  • Use a prepared script to save a chosen background colour in local storage and apply it when the page loads.
  • Show how to remove a stored item and clear all stored keys using simple commands.
📊 Visual ideas
A simple diagram showing a page saving a key-value pair to local storage and reading it back on reload.

Key Concepts

Semantic element
An HTML tag that conveys the meaning or role of its content, such as header or article.
Document outline
The hierarchical structure made by headings that organises a document’s content.
Caption
A short title or description for a table provided with the caption element.
Label
An element that describes a form control and improves accessibility by linking text to input.
Input type
A setting on an input element that defines the kind of data expected, like email or date.
Alt text
Alternative text for an image that describes it when the image cannot be seen.
Source element
A child element used inside audio or video to provide alternate file formats.
Canvas
An HTML element that provides a pixel-based drawing surface controlled by script.
SVG
An XML-based format for vector graphics that scale without losing quality.
Meta tag
An element in the head that provides metadata such as character set or viewport settings.
Iframe
An element that embeds another HTML page inside the current page.
Viewport
The visible area of a web page on a device, controlled by the viewport meta tag for responsiveness.
Responsive design
Design approach that makes web pages adapt to different screen sizes and devices.
Local storage
A browser feature that stores simple key-value data persistently on the client device.

Practice Questions

  1. What is a semantic element and why should we use it? / सेमांटिक एलिमेंट क्या है और हमें इसे क्यों इस्तेमाल करना चाहिए?
    Show answer

    A semantic element is an HTML tag that describes the meaning of its content, such as header or nav; we use it to make pages easier to understand for browsers, search engines and assistive technologies, and to keep code organised. / सेमांटिक एलिमेंट एक HTML टैग है जो अपने अंदर के कंटेंट का अर्थ बताता है, जैसे header या nav; हम इसे इसलिए इस्तेमाल करते हैं ताकि ब्राउज़र, सर्च इंजन और सहायक तकनीकें पेज को बेहतर समझ सकें और कोड व्यवस्थित रहे।

  2. How do you make a table header span two columns? Give the HTML tag or attribute. / आप तालिका का हेडर दो कॉलमों में कैसे फैला सकते हैं? HTML टैग या एट्रिब्यूट बताइए।
    Show answer

    Use the colspan attribute on a th or td element, for example <th colspan="2">Header</th>. / किसी th या td तत्व पर colspan एट्रिब्यूट का उपयोग करें, उदाहरण: <th colspan="2">Header</th>.

  3. Write the purpose of the label element in forms. / फॉर्म में label एलिमेंट का उद्देश्य लिखिए।
    Show answer

    A label describes a form control and links text to an input so users and screen readers know what the input is for, improving accessibility. / एक label फॉर्म कंट्रोल का वर्णन करता है और टेक्स्ट को इनपुट से जोड़ता है ताकि उपयोगकर्ता और स्क्रीन रीडर समझ सकें कि इनपुट किस लिए है, जिससे पहुँच better होती है।

  4. Which input type should be used for an email field and why? / ईमेल फील्ड के लिए किस input type का उपयोग करना चाहिए और क्यों?
    Show answer

    Use type="email" because browsers check the value looks like an email address and offer the right keyboard on mobile devices. / type="email" का उपयोग करें क्योंकि ब्राउज़र यह जांचते हैं कि मान ईमेल पते जैसा है और मोबाइल पर सही कीबोर्ड दिखाते हैं।

  5. Give two reasons to include alt text for images. / इमेज के लिए alt टेक्स्ट शामिल करने के दो कारण बताइए।
    Show answer

    Alt text helps visually impaired users using screen readers and provides a description when the image fails to load. / Alt टेक्स्ट दृष्टिहीन उपयोगकर्ताओं के लिए स्क्रीन रीडर में मदद करता है और जब इमेज लोड न हो तो उसका वर्णन देता है।

  6. What is the difference between canvas and SVG? / canvas और SVG में क्या अंतर है?
    Show answer

    Canvas is pixel-based and good for dynamic, animated scenes controlled by script; SVG is vector-based, uses elements for shapes and stays sharp when scaled, suitable for logos and diagrams. / Canvas पिक्सेल-आधारित है और स्क्रिप्ट से नियंत्रित गतिशील एनिमेशन के लिए अच्छा है; SVG वेक्टर-आधारित है, आकारों के लिए तत्वों का उपयोग करता है और स्केल करने पर तेज रहता है, इसलिए लोगो और आरेख के लिए उपयुक्त है।

  7. How do you provide subtitles for a video in HTML? / HTML में एक वीडियो के लिए उपशीर्षक (subtitles) कैसे प्रदान करते हैं?
    Show answer

    Add a track element inside the video with kind="captions" and a src pointing to the caption file, for example <track kind="captions" src="captions.vtt" srclang="en">. / वीडियो के अंदर kind="captions" वाले track तत्व को जोड़ें और src में कैप्शन फाइल का पथ दें, उदाहरण: <track kind="captions" src="captions.vtt" srclang="en">.

  8. What does the viewport meta tag do and give its common value for mobile support. / viewport meta टैग क्या करता है और मोबाइल समर्थन के लिए इसका सामान्य मान बताइए।
    Show answer

    The viewport meta tag tells the browser how to scale the page on different devices; a common value is <meta name="viewport" content="width=device-width, initial-scale=1.0">. / viewport meta टैग ब्राउज़र को बताता है कि विभिन्न डिवाइसों पर पेज को कैसे स्केल करना है; सामान्य मान है <meta name="viewport" content="width=device-width, initial-scale=1.0">.

  9. Why should sensitive data not be stored in local storage? / संवेदनशील डेटा local storage में क्यों नहीं रखना चाहिए?
    Show answer

    Local storage is not secure because values are stored in plain text on the device and can be accessed by scripts on the same origin; sensitive information should be stored securely on the server. / Local storage सुरक्षित नहीं है क्योंकि मान डिवाइस पर सरल टेक्स्ट रूप में स्टोर होते हैं और उसी मूल पर स्क्रिप्ट द्वारा पहुँचाए जा सकते हैं; संवेदनशील जानकारी सुरक्षित रूप से सर्वर पर संग्रहीत करनी चाहिए।

  10. Explain one reason to use the sandbox attribute on an iframe. / iframe पर sandbox एट्रिब्यूट उपयोग करने का एक कारण समझाइए।
    Show answer

    sandbox restricts what the embedded page can do (for example running scripts or submitting forms), improving security when embedding third-party content. / sandbox वह सीमाएँ लगाता है जो एम्बेड किए गए पेज क्या कर सकता है (जैसे स्क्रिप्ट चलाना या फॉर्म सबमिट करना) और तृतीय-पक्ष कंटेंट एम्बेड करते समय सुरक्षा बढ़ाता है।

Related Laws & Principles

Explore all

Foundational laws & principles connected to this chapter — tap to open in the Laws Explorer.

Loading related laws…
Sourced from 0 content files · LLOS Learn · browse all chapters