Home / Notes / Class 10 / Computer Science / Web pages and HTML
Websites and web pages, the role of browsers and servers, HTML structure, tags and attributes, headings, paragraphs, text formatting, lists, links, images, tables and forms, plus basic page design rules.
A web page is a document that can be viewed in a web browser. A website is a collection of related web pages under one domain name. The first page of a website is called the home page. Pages are joined to each other by hyperlinks.
A web server is a computer that stores websites and sends pages when asked. A web browser is the client program, for example Chrome or Firefox, that requests a page by its URL and displays it. The browser reads the HTML code and shows it as a formatted page.
HTML stands for HyperText Markup Language. It is a markup language, not a programming language. It uses tags to describe the structure of a page, such as headings, paragraphs and images. An HTML file is saved with the extension .html or .htm and can be written in a simple text editor like Notepad.
Tags and elements:
The basic structure of an HTML document is:
A minimal page looks like this: <!DOCTYPE html><html><head><title>My Page</title></head><body><h1>Welcome</h1><p>This is my first page.</p></body></html>
Headings and text:
Text formatting tags:
Lists:
Links and images:
Tables are used to show data in rows and columns:
Forms collect information from visitors. A <form> contains controls such as <input type="text"> for a text box, <input type="password"> for hidden characters, radio buttons and check boxes, a <select> drop down list, a <textarea> for long text and a submit button. CSS (Cascading Style Sheets) controls the colours, fonts and layout of a page, so structure and style are kept separate. Good design uses clear headings, readable fonts, enough contrast, a consistent layout and easy navigation.
Study tip: Practise by typing small pages in Notepad and opening them in a browser. In the exam, write the tags neatly in lowercase, indent nested tags and always close them. Remember the full structure: doctype, html, head with title, then body. For code questions, a short and correct example earns more than a long explanation.
Say the meaning first, then open the card to check.
A single document viewed in a browser.
A set of related web pages under one domain.
The markup language used to build web pages.
A keyword in angle brackets that tells the browser how to show content.
Extra information inside a tag, such as src or href.
Text or a picture that takes you to another page when clicked.
Software that requests and displays web pages.
A computer that stores websites and delivers pages.
A language that sets the style and layout of a page.
These are the kind of questions asked for 2, 3 and 5 marks. Try each one before opening the answer.
HTML (HyperText Markup Language) is the language used to create the structure of web pages with tags. It is not a programming language because it has no logic such as loops or decisions. It only marks up content.
A web page is one document displayed in a browser. A website is a collection of linked web pages that belong together and share a domain name.
<ol> <li>Mango</li> <li>Apple</li> <li>Banana</li> </ol> The ol tag makes a numbered list and each li tag is one item.
The head section contains information about the page that is not shown in the main window, such as the title that appears on the browser tab. The body section contains all the visible content, such as text, images, tables and links.
<img src="logo.png" alt="School logo">. The src attribute gives the file name and alt gives text that is displayed if the image cannot load.
A table starts with <table>. Each row is written with <tr>, and the cells inside it are written with <td>, or <th> for headings. Example: <table><tr><th>Name</th><th>Marks</th></tr><tr><td>Ali</td><td>80</td></tr></table>. This gives a heading row and one data row, each with two columns.