Class 11 Computer Science Web Technology I Notes and Important Questions
Learn
Loading PDF viewer…
Notes for Class 11 Web Technology I (Computer Science) are shown above.
Class 11 Web Technology I Notes (Computer Science)
Static website Dynamic website Same content for every user Content changes by user, time, data Made with HTML & CSS only Uses server language + database Easy and cheap to make Complex and costly eg.
Key points
- Unit 6 : Web Technology I 6.1 Introduction to Web Development Web development :- the work of designing, building and maintaining websites and web applications that run in a web browser over the Internet. 1. Front-end (client side) :- the part users see and use in the browser — layout, colours, buttons. Languages: HTML (structure), CSS (design), JavaScript (behaviour). 2. Back-end (server side) :- the part that runs on the server — logic, login, database. Languages: PHP, Python (Django), Node.js, Java; databases: MySQL, PostgreSQL. 3. Full-stack :- developing both front-end and back-end. Important terms :- Parts of a URL :- https://www.example.com.np/notes/unit6.html Part Meaning https:// protocol www.example.com.np domain name (host) /notes/unit6.html path of the file on the server WWW (World Wide Web) — a system of linked web pages on the Internet, invented by Tim Berners-Lee in 1989 at CERN
- Web page — a single document on the web, written in HTML
- Website — a collection of related web pages under one domain
- Home page — the first / main page of a website (index.html)
- Web server — a computer that stores websites and sends pages to browsers
- HTTP / HTTPS — protocol to transfer web pages; HTTPS is the secure (encrypted) version
- URL (Uniform Resource Locator) — full address of a web page •
- Unit 6 : Web Technology I 6.1 Introduction to Web Development Web development :- the work of designing, building and maintaining websites and web applications that run in a web browser over the Internet. 1. Front-end (client side) :- the part users see and use in the browser — layout, colours, buttons. Languages: HTML (structure), CSS (design), JavaScript (behaviour). 2. Back-end (server side) :- the part that runs on the server — logic, login, database. Languages: PHP, Python (Django), Node.js, Java; databases: MySQL, PostgreSQL. 3. Full-stack :- developing both front-end and back-end. Important terms :- Parts of a URL :- https://www.example.com.np/notes/unit6.html Part Meaning https:// protocol www.example.com.np domain name (host) /notes/unit6.html path of the file on the server WWW (World Wide Web) — a system of linked web pages on the Internet, invented by Tim Berners-Lee in 1989 at CERN
- Web page — a single document on the web, written in HTML
- Website — a collection of related web pages under one domain
- Home page — the first / main page of a website (index.html)
- Web server — a computer that stores websites and sends pages to browsers
- HTTP / HTTPS — protocol to transfer web pages; HTTPS is the secure (encrypted) version
- URL (Uniform Resource Locator) — full address of a web page •
Static website Dynamic website Same content for every user Content changes by user, time, data Made with HTML & CSS only Uses server language + database Easy and cheap to make Complex and costly eg. small personal / info site eg. Facebook, Daraz, result sites 6.2 Web Browsers and Search Engines Web browser :- application software used to access, open and display web pages from the Internet. It reads HTML code and shows it as a formatted page. Examples :- Google Chrome, Mozilla Firefox, Microsoft Edge, Safari, Opera, Brave. The first browser was WorldWideWeb (1990) by Tim Berners-Lee; Mosaic (1993) was the first popular graphical browser. Features :- address bar, tabs, back / forward / refresh, bookmarks (favourites), history, downloads, private (incognito) mode, extensions, zoom, password manager. Search engine :- a web-based program that searches the web for information using keywords and shows a list of matching results. Examples :- Google, Bing, Yahoo, DuckDuckGo (privacy), Baidu (China), Yandex (Russia). How a search engine works :- 1. Crawling :- programs called crawlers / spiders / bots visit web pages and follow links to find new pages. 2. Indexing :- the content of pages is stored and organised in a huge database called the index. 3. Ranking & results :- when a user searches, the engine finds matching pages in the index and shows them in order of relevance.
- Web browser Search engine Software installed on the computer A website / web service Opens and displays web pages Finds web pages using keywords Needed to open a search engine Opened inside a browser eg. Chrome, Firefox eg. Google, Bing 6.3 Overview of Internet & Web Technologies 6.4 Content Management System (CMS) CMS :- software that lets users create, edit, manage and publish website content without writing code, using a simple dashboard and editor. Internet — a global network of networks that connects millions of computers using TCP/IP
- Intranet — private network inside an organisation using Internet technology; Extranet — intranet partly opened to partners
- E-mail — sending electronic messages (SMTP to send, POP3 / IMAP to receive)
- FTP — File Transfer Protocol: upload / download files to a server
- Telnet / SSH — log in to and control a remote computer (SSH is secure)
- IP address — unique number of a device on a network, eg. 192.168.1.1
- DNS — Domain Name System: converts domain names into IP addresses
- Client–server model — the browser (client) requests, the web server responds
- Client-side scripting (JavaScript, runs in browser) vs server-side scripting (PHP, Python, runs on server)
- Web 1.0 (read-only pages) → Web 2.0 (social, interactive: Facebook, YouTube) → Web 3.0 (semantic, AI, decentralised)
- Other — cloud computing, e-commerce, social media, VoIP (internet calls), IoT, XML & JSON (data formats) •
- Examples :- WordPress (most popular, powers a large share of all websites), Joomla, Drupal, Wix, Shopify (online stores), Blogger. Features :- WYSIWYG editor (What You See Is What You Get), ready-made themes, plugins / extensions, media library, user roles (admin, editor, author), SEO tools, menus, comments. Advantages Disadvantages No coding needed — easy for anyone Less control over design & code Fast to build and update Plugins may cause security risks Many users can work together Needs regular updates Free themes & plugins Can become slow with many plugins 6.4 HTML : The Language of the Web HTML (HyperText Markup Language) :- the standard markup language used to create web pages. It uses tags to tell the browser how to structure and display content. Created by Tim Berners-Lee (1991); the latest version is HTML5. HyperText = text with links to other pages. Markup = tags that "mark" text to give it meaning. HTML is not a programming language — it has no logic or calculation. 6.4.1 Objectives of HTML Writing HTML :- type the code in a text editor (Notepad, VS Code, Sublime Text), save with extension .html or .htm (eg. index.html), then open the file in a browser. To give structure to web pages (headings, paragraphs, lists, tables)
- To display text, images, audio and video in the browser
- To link web pages and websites using hyperlinks
- To create forms for collecting user data
- To be platform independent — works on any OS and browser
- To provide the base on which CSS and JavaScript work •
- 6.4.2 Structure of HTML <!DOCTYPE html> <html> <head> <title>My First Page</title> </head> <body> <h1>Welcome</h1> <p>This is my first web page.</p> </body> </html> 6.4.3 Publishing and Hosting Publishing a website means putting it on a web server so anyone can open it on the Internet. Steps: 1. Design :- make the web pages and test them on your computer. 2. Domain name :- register a name, eg. myschool.edu.np. 3. Web hosting :- rent space on a web server from a hosting company. 4. Upload :- send files to the server using FTP (FileZilla) or the cPanel file manager. 5. Test & maintain :- check all links and update regularly. Free hosting for practice: GitHub Pages, Netlify, Google Sites. 6.4.4 HTML Tags vs Attributes Tag :- a keyword written inside angle brackets < > that tells the browser what to do. eg. <p>, <b>. <!DOCTYPE html> — tells the browser it is an HTML5 document
- <html> — root tag; all other tags are inside it
- <head> — information about the page (title, meta, CSS); not shown in the page body
- <title> — text shown on the browser tab
- <body> — everything visible on the page •
Attribute :- extra information about a tag, written inside the opening tag as name="value". eg. <body bgcolor="yellow">, <img src="logo.png" width="100"> Tag Attribute Main command in < > Extra property of a tag Can be paired or empty Always inside the opening tag eg. <p>, <table> eg. align, border, src 6.4.5 Basic Tags : HTML, HEAD, TITLE, BODY Attributes of <body> (old HTML, still in syllabus): Attribute Use Example bgcolor background colour bgcolor="lightblue" text fore colour (text colour) text="navy" background background image background="bg.jpg" link / vlink / alink colour of new / visited / active link link="blue" <html> <head><title>Colours</title></head> <body bgcolor="lightyellow" text="blue" background="flower.jpg"> <bgsound src="music.mp3" loop="infinite"> Hello Nepal! </body> </html> Background sound :- <bgsound> worked only in old Internet Explorer. In HTML5 use <audio src="music.mp3" autoplay loop> instead. Note: bgcolor, text, background, font, center etc. are old (deprecated) in HTML5 — CSS is used now — but they are asked in the NEB exam. Container (paired) tag — has an opening and closing tag: <b> … </b> • Empty (unpaired) tag — only one tag, no closing: <br>, <hr>, <img> •
- 6.4.6 Heading Tags (H1 to H6) Used to give headings. <h1> is the biggest and <h6> the smallest. Attribute align = left / center / right. <h1 align="center">Heading 1</h1> <h2>Heading 2</h2> <h3 align="right">Heading 3</h3> <h4>Heading 4</h4> <h5>Heading 5</h5> <h6>Heading 6</h6> Output :- Heading 1 Heading 2 Heading 3 Heading 4 Heading 5 Heading 6 6.4.7 FONT Tag and its Attributes <font> changes the size, colour and face (style) of text. <basefont> sets the default font for the whole page (size, color, face). <big> makes text one size bigger and <small> one size smaller. size — 1 to 7 (1 = smallest, 7 = biggest, default = 3); also relative: +1, −2
- color — name or hex code: "red", "#FF0000"
- face — font name: "Arial", "Times New Roman" •
- <basefont size="4" color="green"> <font size="7" color="red" face="Arial">Big red text</font> <font size="2">small text</font> Normal <big>BIG</big> and <small>small</small> Output :- Big red text small text Normal BIG and small 6.4.8 Paragraph (P), 6.4.9 Line Break (BR), 6.4.10 Comment <!-- this is my address --> <p align="center">Kathmandu<br>Nepal</p> Output :- Kathmandu Nepal 6.4.11 Formatting Text Tag Use Example → output <b> bold Nepal <i> italic Nepal <u> underline Nepal <mark> highlight Nepal <sup> superscript x2, 1st <p> — makes a paragraph with a blank line before and after; attribute align = left / center / right / justify.
- <br> — empty tag; breaks the line (next text starts on a new line).
- <hr> — draws a horizontal line (size, width, color, noshade).
- Comment <!-- … --> — note for the programmer, not shown in the browser. •
Tag Use Example → output <sub> subscript H2O <em> emphasis (italic) important <strong> strong (bold) warning <blockquote> long quotation (indented) text moves to the right <pre> preformatted — keeps spaces & lines shown exactly as typed <p>Water is H<sub>2</sub>O and a<sup>2</sup>+b<sup>2</sup></p> <blockquote>Hard work is the key to success.</blockquote> <pre> Name Marks Ram 80 </pre> 6.4.12 Ordered List (OL) <ol> makes a numbered list; each item is written in <li>. Attributes: type = 1 (default), A, a, I, i; start = starting number; value (in li) = change number of that item. <ol type="A" start="3"> <li>Mango</li> <li>Apple</li> <li value="10">Banana</li> </ol> Output :- C. Mango D. Apple J. Banana
type Numbering 1 1, 2, 3 … A A, B, C … a a, b, c … I I, II, III … i i, ii, iii … 6.4.13 Unordered List (UL) and Definition List (DL) <ul> makes a bulleted list. Attribute type = disc (●, default), circle (○), square (■). <ul type="square"> <li>Chrome</li> <li>Firefox</li> </ul> Output :- Chrome Firefox Definition list :- <dl> list of terms with descriptions; <dt> = term, <dd> = its description (indented). <dl> <dt>CPU</dt> <dd>Central Processing Unit</dd> </dl> Output :- CPU Central Processing Unit
- 6.4.14 ADDRESS Tag <address> is used to write contact information (address, phone, email) of the author or owner. Browser shows it in italic on a new line. <address> Ram Sharma<br>Baneshwor, Kathmandu<br>ram@example.com </address> Creating Links (Anchor Tag and Hyperlink) A hyperlink is a clickable text or image that takes us to another page or place. It is made with the anchor tag <a> and attribute href (hypertext reference). 1. Link to another HTML document :- <a href="about.html">About us</a> 2. Link to a website (absolute URL) :- <a href="https://www.google.com" target="_blank">Google</a> (target="_blank" opens in a new tab) 3. Link to a place in the same document :- first give a name / id to the place: <h2 id="top"> then link: <a href="#top">Go to top</a> 4. Link to a place in another document :- <a href="notes.html#unit2">Unit 2</a> 5. Other links :- email: <a href="mailto:ram@example.com">; image as link: <a href="home.html"><img src="logo.png"></a> Absolute URL = full address (https://…). Relative URL = path from the current file (about.html, images/a.png). 6.4.15 Tables (TABLE, TR, TH, TD) <table> — creates a table; attributes: border, width, cellpadding (space inside cell), cellspacing (space between cells), bgcolor, align
- <caption> — title of the table
- <tr> — table row
- <th> — header cell (bold & centred)
- <td> — data cell; attributes rowspan and colspan join cells •
<table border="1" cellpadding="5"> <caption>Result</caption> <tr> <th>Name</th> <th>Marks</th> </tr> <tr> <td>Ram</td> <td>85</td> </tr> <tr> <td>Sita</td> <td>92</td> </tr> <tr> <td colspan="2">Total = 177</td> </tr> </table> Output :- Result Name Marks Ram 85 Sita 92 Total = 177 6.4.16 Forms A form is used to collect data from users (login, admission, feedback). <form> attributes: action (where to send data) and method (GET or POST). Element Use <input type="text"> single-line textbox <input type="password"> hides typed characters <input type="radio"> choose one option (same name) <input type="checkbox"> choose many options <textarea rows cols> multi-line text box <select><option> drop-down list <input type="submit/reset/button"> buttons
<form action="save.php" method="post"> Name: <input type="text" name="sname"><br> Gender: <input type="radio" name="g"> Male <input type="radio" name="g"> Female<br> Hobby: <input type="checkbox"> Music <input type="checkbox"> Sports<br> Comment: <textarea rows="2" cols="20"></textarea><br> <input type="submit" value="Send"> <input type="reset"> </form> Output :- Name: Gender: Male Female Hobby: Music Sports Comment: Send Reset GET POST Data shown in the URL Data hidden in the request Less secure, limited size More secure, no size limit Used for search Used for login, forms 6.4.17 HTML5 Elements : audio, video, source, track, embed HTML5 (2014) added new features: semantic tags (header, nav, section, article, footer), audio & video without plugins, canvas, SVG, new input types (email, date, number, color).
- <audio controls loop> <source src="song.mp3" type="audio/mpeg"> <source src="song.ogg" type="audio/ogg"> </audio> <video width="320" height="240" controls poster="cover.jpg"> <source src="lesson.mp4" type="video/mp4"> <track src="nepali.vtt" kind="subtitles" srclang="ne" label="Nepali"> </video> <embed src="notes.pdf" width="400" height="300"> 6.4.18 HTML5 Graphics : canvas and svg <canvas> is a blank drawing area; we draw on it using JavaScript. Good for games and animations (pixel based). <canvas id="c" width="200" height="100" style="border:1px solid"></canvas> <script> var ctx = document.getElementById("c").getContext("2d"); ctx.fillStyle = "blue"; ctx.fillRect(20, 20, 80, 50); </script> <svg> (Scalable Vector Graphics) draws shapes with XML tags; it stays sharp when zoomed (vector). <audio> — plays sound. Attributes: controls, autoplay, loop, muted
- <video> — plays video. Attributes: controls, width, height, autoplay, loop, muted, poster (picture before play)
- <source> — gives more than one file format; the browser plays the first it supports
- <track> — adds subtitles / captions (.vtt file) to video; kind, src, srclang, label
- <embed> — embeds external content like PDF or a media file •
<svg width="200" height="100"> <circle cx="50" cy="50" r="40" fill="yellow" stroke="green"/> <rect x="110" y="20" width="70" height="60" fill="red"/> </svg> Output :- canvas svg Drawn with JavaScript Drawn with tags (XML) Pixel based (raster) Vector based Blurs when zoomed Sharp at any size Good for games Good for logos, charts, icons 6.4.19 Domain Name and Web Hosting Domain name :- the human-readable name of a website, eg. google.com. It is easier to remember than an IP address; DNS converts it into the IP address. Parts :- www . example . com . np → subdomain (www) . second-level domain (example) . top-level domain (com / np) TLD Used for .com commercial .org organisations .edu education .gov government
- TLD Used for .net network .np Nepal (country code) In Nepal, .np domains (eg. .com.np) are registered through Mercantile Communications and are free for Nepali citizens and registered organisations. Web hosting :- a service that provides space on a web server to store website files and make them available on the Internet 24/7. 6.5 Cascading Style Sheets (CSS) 6.5.1 Introduction to CSS CSS :- a style sheet language used to describe the look and layout of HTML pages — colours, fonts, spacing, borders, backgrounds and position. HTML gives structure; CSS gives design. Syntax :- selector { property: value; } h1 { color: blue; text-align: center; } p { font-size: 18px; font-family: Arial; } Here h1 and p are selectors, color / font-size are properties and blue / 18px are values. "Cascading" means many style rules can apply and the most specific / last one wins. Shared hosting — many websites on one server; cheap
- VPS hosting — virtual private part of a server; more control
- Dedicated hosting — whole server for one website; costly, powerful
- Cloud hosting — many connected servers; scalable •
- Advantages :- 6.5.2 Inline CSS Style is written inside the HTML tag using the style attribute. It applies only to that one element. <p style="color: red; font-size: 20px;">This is red text.</p> 6.5.3 Embedded (Internal) CSS Styles are written inside the <style> tag in the <head> section. It applies to the whole of that one page. <head> <style> body { background-color: lightyellow; } h1 { color: green; } </style> </head> 6.5.4 External CSS Styles are written in a separate file with .css extension and linked to pages using the <link> tag. One file can style the whole website. Saves time — one style sheet can design many pages
- Easy to change the look of a whole website
- Clean HTML code, faster loading
- Better design control and responsive (mobile friendly) pages •
- /* style.css */ h1 { color: navy; } p { line-height: 1.5; } <!-- in index.html --> <head> <link rel="stylesheet" href="style.css"> </head> Inline Embedded External In style attribute In <style> in head In separate .css file One element One page Many pages / whole site Highest priority Medium Lowest (by default) Hard to maintain OK for one page Best for big websites Important Questions — Unit 6 Short questions Long / practical questions What is web development? Differentiate between front-end and back-end.
- Differentiate between a web browser and a search engine.
- What is a CMS? Give any two examples.
- Differentiate between container and empty tags with examples.
- Write the use of: <sup>, <sub>, <pre>, <blockquote>, <mark>.
- What is a domain name and web hosting?
- Differentiate between canvas and svg.
- What is CSS? Write its advantages.
- Write HTML code to display your class routine in a table with rowspan and colspan.
- Write HTML code for an admission form with textbox, radio buttons, checkboxes, textarea and buttons. •
- Exam tip :- in code questions always write the full structure (html, head, title, body), close every container tag, and put attribute values in quotes. Write HTML code to show an ordered list starting from "C" and a nested unordered list.
- Explain the three types of CSS with examples.
- Write HTML code to link three pages and a place within the same page. •
Related chapters in Computer Science: Class 11 Programming Concepts and Logics notes, Class 11 Multimedia notes, Class 11 Computer System notes.
Practice
Important Questions
What is HTML? Write an HTML program to create a student registration form containing name, email, gender, date of birth, course selection, and a submit button.
Define different types of CSS.
Define the different types of CSS.
Which HTML tag is used to create a hyperlink?
<link>
<a>
<href>
<hyperlink>
Which of the following is a content management system (CMS)?
WordPress
Calculator
Device Manager
Notepad
How to insert an image in a web page using HTML tag?
<img=...>
<img source=...>
<img src=...>
<img href=...>
2 more questions locked
Upgrade to a paid plan to view all important questions
Exam
This unit introduces students to the fundamentals of web technology and website development. It covers web browsers, search engines, Internet technologies, content management systems, HTML, HTML tags, attributes, lists, tables, forms, multimedia elements, graphics, domain names, and web hosting. Students also learn CSS and its different methods for designing and formatting web pages.
This page covers Web Technology I, chapter 6 of 8 in the Class 11 Computer Science syllabus set by the National Examination Board (NEB). 6 important questions for this chapter are available, each with a model answer.
Read through the notes above, then try each important question for this chapter before checking its solution — comparing your working against past NEB and model questions is one of the most efficient ways to revise.