TalentJR apps
Textbook: Information Technology – Class 11 (Balbharati, official free PDF) · pages 30–59
How does typing a web address bring a page to your screen, and how do you build that page yourself? This chapter covers how the web works, HTML5 page structure, text formatting, headings, images, tables, links and forms, and then JavaScript — variables, data types, operators, built-in and user-defined functions, if-else and events — with every exercise program written out and explained. On this page tags are written in square brackets: [h1] means the h1 tag typed with angle brackets, and [/h1] is its closing tag. When you type real code, use angle brackets.
When you type a domain name, the browser asks a DNS server for the web server's IP address, then requests the page from that server, which sends it back over HTTP. Key terms: web page (a text file written in HTML), website (linked pages), web browser (Chrome, Firefox), web server (Apache, nginx, IIS), URL (the page's address) and HTTP (the client-server protocol of the web).
HTML (HyperText Markup Language), introduced by Tim Berners-Lee, uses tags inside angle brackets to tell the browser how to show content. Tags are not case sensitive. Container (paired) tags have an opening and closing tag; empty tags like br, hr and img stand alone. A page starts with the DOCTYPE declaration and has html, head (with title) and body sections; HTML5 adds semantic tags such as header, nav, section, article, aside and footer.
Formatting tags (b, i, u, small, sub, sup, ins, del, mark), six heading levels h1–h6, p for paragraphs, hr for ruled lines, img (src, alt, height, width) for pictures and a with href for hyperlinks build the content. Tables use table, caption, tr, th and td with border, align, colspan and rowspan; colgroup/col, thead, tbody and tfoot group columns and rows.
Forms collect input. The form tag has name, action and method (GET — the default, shows data in the address bar; POST — hides it, better for private data). Controls come from input with type text, password, radio, checkbox, submit, reset or button, plus textarea for many lines and select with option for drop-down lists.
JavaScript, placed inside the script tag in the head or body, adds logic to pages. It has variables (var), data types (number, string, boolean, plus special values Infinity, null, undefined), arithmetic, relational, logical, assignment and ++/-- operators, comments, built-in functions (parseInt, parseFloat, alert, prompt, confirm, toUpperCase, toLowerCase, isNaN), if and if-else, user-defined functions, and event handlers like onClick, onMouseOver and onKeyUp.
Get a ✓ Verified tutor for “Impressive Web Designing” — live online or at home. We aim to suggest up to 3 tutors within 24 hours.
Write the skeleton of an HTML5 page titled 'My School' with a header, a section and a footer.
Answer: [!DOCTYPE html] [html] [head][title]My School[/title][/head] [body] [header][h1]Shivaji Junior College[/h1][/header] [section][p]Welcome to Class 11 Science.[/p][/section] [footer]Contact: office desk[/footer] [/body] [/html]
Make a biodata page: largest heading 'Biodata' centred, name in bold, address in italics and standard underlined.
Answer: [h1 align='center']Biodata[/h1] [b]Name: Aarav Patil[/b][br] [i]Address: 14 Shivaji Nagar, Kolhapur[/i][br] [u]Standard: XI Science[/u]
Write a table with one heading 'Colors' spread over two cells, and Red and Green below it.
Answer: [table border='1'] [tr][th colspan='2']Colors[/th][/tr] [tr][td]Red[/td][td]Green[/td][/tr] [/table] — Without colspan the word Colors would sit above Red only.
Write a form that sends name, address and standard to save.php privately, with Submit and Clear buttons.
Answer: [form action='save.php' method='post'] Name: [input type='text' name='nm' maxlength='30'][br] Address: [textarea name='addr' rows='3' cols='30' required][/textarea][br] Standard: [select name='std'][option]11[/option][option selected]12[/option][/select][br] [input type='submit' value='Submit'] [input type='reset' value='Clear'] [/form]
Find: (1) 20 + '20' (2) 10 + 20 + '2' (3) 10 + '2' + '2'
Answer: (1) '2020' — 20 becomes text and is joined. (2) '302' — 10 + 20 = 30 first, then joined with '2'. (3) '1022' — 10 + '2' = '102', then + '2' = '1022'.
Write a function that reads two numbers from text boxes t1 and t2 of form f1 and shows their sum in t3.
Answer: function add() { var a = parseFloat(f1.t1.value); var b = parseFloat(f1.t2.value); f1.t3.value = a + b; } — called by a button with onClick='add()'. Without parseFloat, 2 and 3 would give '23'.
| Tag / command | What it does | Example |
|---|---|---|
| [h1] ... [h6] | Six heading sizes, h1 largest | [h2 align='center']Results[/h2] |
| [b] [i] [u] [sub] [sup] | Bold, italic, underline, subscript, superscript | H[sub]2[/sub]O, a[sup]2[/sup] |
| [img] | Inserts an image (empty tag) | [img src='cat.jpg' alt='A cat' width='200'] |
| [a href] | Creates a hyperlink | [a href='marks.html']See marks[/a] |
| [table] [tr] [th] [td] | Table, row, heading cell, data cell | [td colspan='2']Total[/td] |
| [form] + [input] | Form and its controls | [input type='password' name='pw' maxlength='8'] |
| [select] [option] | Drop-down list | [select name='city'][option]Pune[/option][/select] |
| var | Declares a JavaScript variable | var total = 0; |
| parseInt() / parseFloat() | Turns text into a number | parseInt('42kg') gives 42 |
| prompt() / alert() | Reads input / shows a message | var n = prompt('Enter a number'); |
| if ... else | Chooses between two blocks | if (m >= 35) alert('Pass'); else alert('Fail'); |
| onClick | Runs a function when clicked | [input type='button' value='Go' onClick='show()'] |
Solve each one in your notebook first. Then open the solution and compare every step.
1. Q.1 (1) A data entry operator must insert a photograph, write remarks about it and underline the heading. From image, text, textarea, img, ul, u, choose the right tags in order. (2) Physical tags for H₂O, for Hello (shown in italics) and for a¹². (3) Group tags into paired and empty. (4) Write the six relational operators.
Answer: (1) img (photo) → textarea (remarks) → u (underline). (2) sub for H₂O, i for Hello, sup for a¹². (3) The book prints no list here; a sample answer — paired: html, head, body, p, table (also b, u, textarea, ul); empty: br, hr, img. (4) less than, greater than, less than or equal to (written <=), greater than or equal to (>=), equal to (==), not equal to (!=).
2. Q.1 Identify the logical operators: OR, AND, ||, &, &&, ++. Q.2 (1) State three attributes of input. Q.4 (A) Crossword: across 2 — tag for a table row; across 4 — tag to create a form; down 1 — attribute giving a link's path; down 3 — tag for a horizontal ruled line. (B) Word search: Boolean value; keyword in if; built-in function; function to check a number; keyword to declare a variable; function to evaluate an expression.
Answer: Logical operators: || (OR) and && (AND) — the words OR/AND name them; & is a bitwise operator and ++ is increment (the third logical operator, !, is not in the list). Q.2 (1) Any three: type, name, value, maxlength, size, checked. Q.4 (A) Across 2 TR, across 4 FORM, down 1 HREF, down 3 HR. (B) false, else, confirm, isNaN, var, eval.
3. Q.2 (5) Complete the program to show the product of 6.40 and 300. Q.3 Find the errors: var length, breadth; length=4.5; breadth=6; area=1/2*length*breadth; document.write('Area of triangle is' area);
Answer: Q.2 (5) After the body tag: [script type='text/javascript'] var x = 6.40; var y = 300; document.write(x * y); [/script] — the page shows 1920. Q.3 The last line is missing the + that joins the text and the variable; it should be document.write('Area of triangle is ' + area);. Also area is never declared — better to write var length, breadth, area; (and straight quotes must be used, not curly ones). The corrected program prints Area of triangle is 13.5.
4. Q.5 Trace the output: a page titled 'Heading tags' with h1 align=left 'Information Technology', then hr, then h2 align=center 'XI Standard', then h3 align=right 'Division'. Q.8 When do onClick, onKeyUp and onMouseUp occur? Q.10 (1) Default form method? (2) Post-increment operator?
Answer: Q.5 The title bar shows 'Heading tags'. 'Information Technology' appears in the biggest bold heading at the left, a horizontal line runs across the page under it, 'XI Standard' appears smaller and centred, and 'Division' appears smaller still at the right edge. Q.8 onClick — when the user clicks an element; onKeyUp — when a pressed key is released; onMouseUp — when the mouse button is released over an element. Q.10 (1) Get. (2) x++.
5. Q.6 (1) A junior designer needs a page to enter employee name and address, with buttons to clear and to submit. Which controls and tags? (2) A page must accept a number and check whether it lies between 50 and 100. List variables, operators, built-in function and structure.
Answer: (1) Controls: a text box for the name — input type='text'; a multi-line box for the address — textarea; a submit button — input type='submit'; a clear button — input type='reset'; all inside the form tag. (2) Variables: n (the number); built-in functions prompt() to read and parseInt() to convert; operators >=, <= and &&; structure if ... else. Code: var n = parseInt(prompt('Enter a number')); if (n >= 50 && n <= 100) alert('Between 50 and 100'); else alert('Not in range');
6. Q.7 (1) HTML for a class time table. (2) HTML form to submit name, address and standard. (3) JavaScript to add two numbers on a mouseover event.
Answer: Sample (1): [table border='1'][caption]XI Science Time Table[/caption] [tr][th]Day[/th][th]8:00[/th][th]9:00[/th][th]10:00[/th][/tr] [tr][td]Monday[/td][td]Physics[/td][td]IT[/td][td]Maths[/td][/tr] [tr][td]Tuesday[/td][td]Chemistry[/td][td]English[/td][td]Biology[/td][/tr] [/table]. Sample (2): see the form example in the notes — action, method='post', a text box, a textarea, a select for 11/12, Submit and Reset. Sample (3): [form name='f1'] First: [input type='text' name='a'] Second: [input type='text' name='b'] [input type='button' value='Add' onMouseOver='add()'] [/form] [script] function add() { var x = parseFloat(f1.a.value); var y = parseFloat(f1.b.value); alert('Sum = ' + (x + y)); } [/script] — moving the pointer onto the button shows the sum.
7. Q.9 Write HTML for the table: Place | State | Maximum Temperature in °C — Wardha, Akola (Maharashtra, 47.5, 46.4); Khajuraho, Sagar (Madhya Pradesh, 46.4, 46.2).
Answer: [table border='1'] [tr][th]Place[/th][th]State[/th][th]Maximum Temperature in °C[/th][/tr] [tr][td]Wardha[/td][td rowspan='2']Maharashtra[/td][td]47.5[/td][/tr] [tr][td]Akola[/td][td]46.4[/td][/tr] [tr][td]Khajuraho[/td][td rowspan='2']Madhya Pradesh[/td][td]46.4[/td][/tr] [tr][td]Sagar[/td][td]46.2[/td][/tr] [/table]
Read the question, answer it in your head, then tap the card to check. 20 cards.
15 questions. Tap an option — you will see at once if it is right and why.
1. Which software converts a domain name into an IP address?
Answer: B. DNS works like a phonebook.
2. Which of these is a web server?
Answer: D. Firefox and Chrome are browsers.
3. Content of which tag appears on the title bar?
Answer: C. title sits inside head.
4. Which is an empty tag?
Answer: D. It has no closing tag.
5. Which HTML5 tag is meant for a sidebar?
Answer: A. aside holds side content.
6. Which tag highlights text?
Answer: A. mark shows text as highlighted.
7. Which attribute of hr sets its thickness?
Answer: B. width sets its length.
8. A cell spread over three rows needs…
Answer: C. rowspan works downwards.
9. Which form method hides data from the address bar?
Answer: D. GET shows data in the URL.
10. Which input type clears the form?
Answer: B. submit sends the form.
11. Which textarea attribute shows a grey hint?
Answer: A. e.g. placeholder='your address'.
12. If a = 100 and b = a++, then b is…
Answer: A. Post-increment uses the old value first.
13. Which is a logical operator in JavaScript?
Answer: C. == is relational, % arithmetic, ++ increment.
14. What does isNaN(100) return?
Answer: C. 100 is a number.
15. Which event fires when the pointer moves onto an element?
Answer: B. onMouseOut is when it leaves.
Get a ✓ Verified tutor for “Impressive Web Designing” — live online or at home. We aim to suggest up to 3 tutors within 24 hours.
Done with the notes? Revise Impressive Web Designing the fun way: match key terms, beat the 60-second lightning round and spot true or false facts. Every game uses only this lesson, so each round is real exam revision.
⭐ 0 XP⏱ About 60 minutes
Get a ✓ Verified tutor for “Impressive Web Designing” — live online or at home. We aim to suggest up to 3 tutors within 24 hours.
Sign in free to see the answers to the textbook exercise of Impressive Web Designing.
Sign in to see solutionsStuck on a question? Type it, 🎤 speak it or 📷 snap a photo of it and get simple, step-by-step help with “Impressive Web Designing” — important questions, a quick quiz, revision notes — in English, मराठी or हिंदी.
Sign in with Google to ask the AI tutor. It's free — 20 questions a day, one TalentJR account.
Sign in to askPrefer a real teacher? TalentJR teachers take live online classes anywhere in India. Tell us what you need and our team will call you with timings and fees.