Learn/ 9th Computer Science/ Unit 8 /Short Questions

Unit 8: Web Development with HTML, CSS and JavaScript — Short Questions

9th Class Computer Science · Unit 8: Web Development with HTML, CSS and JavaScript

Web Development & Its Components

1.What is web development?

Web development is the process of creating websites and web applications. It involves using various programming languages and tools to design, build, and maintain websites.

2.Differentiate between Front-end & Back-end development.

Front-end Development focuses on what users see and interact with on a website.

Back-end Development manages the behind-the-scenes part of a website, like servers, databases, and application logic.

3.Define HTML.

HTML stands for Hyper Text Markup Language. It is the standard language used to create web pages. Think of HTML as the building blocks of a website.

4.Define HTML Content.

Content in HTML is the main information on a web page that users read and interact with.

5.What are the headings in HTML?

Headings in HTML, ranging from <h1> to <h6>, are used to define the structure and hierarchy of content on a web page.

6.Describe the use of Paragraphs and Links in HTML.

Paragraphs in HTML are used to organize and separate text into readable sections. Links in HTML are used to connect one web page to another. They allow you click on words or images to go to different parts of the same page or to other pages on the internet.

7.Why comments are used in HTML?

In HTML, comments are used to insert notes or explanations within the code.

CSS & JavaScript

8.Define CSS.

Styling with CSS (Cascading Style Sheets) is essential for enhancing the visual appearance of web pages and improving user experience.

9.What do you know about JavaScript?

JavaScript is a programming language that is used to make websites interactive and engaging.

10.Define Debugging.

Debugging is the process of finding and fixing issues in your code.

HTML

11.Differentiate between ordered and unordered list.

Ordered List In an ordered list all the items of the list start with a number and the numbers are in ascending order. The <ol></ol> tags are used for creating an ordered list and each item of the list is surrounded with <li></li> tags.

Unordered List In an unordered list each item of the list generally starts with a bullet. Unordered means the list items are not having a number. The <ul></ul> tags are used for creating an unordered lists and each item of the list is surrounded with <li></li> tags.

12.Define Hyperlink.

Hyperlink is such an icon, graphic, or text in a webpage, when clicked takes you to some other webpage. Hyperlink allow you to go from one page to another page.

13.What are two important terms that you need to understand in the name HTML?

There are two important terms that you need to understand in the name HTML.

  • Hypertext
  • Markup Language
14.What do you mean by Markup Language?

Markup is what HTML tags do to the text inside them. A webpage consists of a series of elements which are represented by tags.
Example: <p> I am 9th class student </p>
Here <p> shows marking of paragraph opening tag and </p> means marking of paragraph closing tag.

15.Define hypertext.

The term Hypertext is used due to the special text in a webpage called hyperlinks. By clicking on these links you can move from one webpage to another. Hyperlinks are used to navigate on the World Wide Web (WWW).

16.What are HTML tags?

HTML tags are commands or codes that specifies how a Web page is formatted.

17.What is the role of HTML?

HTML tells the browser how the contents are structured inside a webpage. When you send request to a web server through a web browser to access a webpage, you get HTML as a response from there. The web browser understands the HTML and displays contents of the webpage.

18.Name the types of Lists in HTML.

These are the following types of lists in HTML:
1: Unordered list
2: Ordered list

19.What is the use of hyperlinks?

Hyperlinks are used to navigate on the World Wide Web (WWW). Hyperlink is such an icon, graphic, or text in a webpage, that when clicked takes you to some other webpage. The term Hypertext is used due to the special text in a webpage called hyperlinks.

20.Describe HTML Elements and Element content.

HTML elements HTML documents consist of text files that contain HTML elements. HTML elements are defined using HTML tags. HTML tags are surrounded by the two characters < and > and generally they come in pairs, such as <head> </head>. Some HTML have no content are called empty elements. Empty element do not have an end tag, such as <br> element.

Element content The text between these two tags is known as element content.

HTML Tags

21.How we create Webpage using HTML?

To create a webpage, you need a text editor, a software to edit text in a file. You can use Notepad and in Mac you use Text Edit. You can follow these four steps to create your first webpage.
1. Open text editor like Notepad or WordPad
2. Write some HTML content.
3. Save the HTML Page with extension .htm or .html
4. In order to view your first webpage, just double click the HTML file web browser is automatically opened to show your webpage.

22.How many types of tags are in an HTML?

There are two types of tags in an HTML document.
1. Paired Tags
2. Unpaired Tags

23.What is the difference between paired tags and unpaired tags.

Paired Tags
Most of the tags in HTML are paired tags. They consist of a start tag, an end tag and contents between them.
Syntax: <tagname> Contents </tagname>
Example: For example, tag p to create a paragraph in HTML document is a paired tag.

Unpaired Tags
Some tags do not have closing tags and they are called unpaired tags or empty tags. They are simply written as <tagname>.
Example: For example, <br> for line break. <hr> to insert a horizontal line.

HTML & Different Attributes

24.What are attributes in HTML?

Attributes are the properties associated with tags. They provide some information with respect to a specific tag. Each attribute is given a value.
Generally, a tag with attributes is written as: <tagname attribute1="value" attribute2="value" ....attribute="value">
Example: For example, <p align = "center"> Content </p> shows the content of a paragraph at center with respect to left and right margins.

25.Define HTML and body tags.

HTML The first tag in the html document is <html> that indicates the start of the HTML document. The last tag is </html> indicates that is the end of the HTML document.
Syntax: <html> </html>

Body Section Anything typed inside the body tags will be displayed in the browser window. The visible part of the HTML document is between <body> and </body>.
Syntax: <body> </body>

26.What do you know about Head section of HTML document?

Head section typically defines the document title, styles and other information about the whole document. Head section starts with <head> tag and ends with </head>
Syntax: <head> </head>

27.How do we specify a Page Title?

To specify title of the webpage, you use <title> tag inside <head> </head> tags. The text between these tags is used to set the title to the page. It is displayed on the title bar of the Web browser.

Syntax <title> </title>

Example <title>First HTML Document</title> will display First HTML Document, on the title bar of the Web browser.

28.How we create paragraph and Inserting Line breaks by using HTML?

Creating a Paragraph The <p> tag marks starting of a paragraph, and </p> tag marks closing of the paragraph. The text inside <p> </p> tags is actual contents of the paragraph.
Syntax: <p> </p>

Inserting Line Breaks The <br> element inserts a line break without starting a new paragraph.
Syntax: <br>

Example <p> This is <br> a paragraph</p> displays text in two lines, as following:
This is
a paragraph

29.How we insert spaces and add headings/sub-headings by using HTML?

Inserting Spaces If the user wants to have many spaces in a HTML document then the &nbsp character entity must be used.
Syntax: &nbsp

Example For example, <p> I study &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; in 9th class. </p> generates the following output.
I study in 9th class.

Add Headings/Sub-headings There are six headings tags, <h1></h1> to <h6></h6>. The <h1></h1> tags are used to specify the largest heading and <h6></h6> tags specify the smallest.

30.What is Text formatting? And how we bold the text.

Text formatting tags are used to format the text in HTML document. Some commonly used text formatting tags are described below.

Bold the text These tags will make the text bold that is within the tags.
Syntax: <b></b>

Example <b> I LOVE PAKISTAN</b>

31.How can you underline and Italic the text by using HTML tags?

Underlining the text These tags will underline the text that is within the tags.
Syntax: <u></u>

Example <u> I LOVE PAKISTAN </u>

Italic the text These tags are used to make the text italic that is within the tags.
Syntax: <i></i>

Example <i> I LOVE PAKISTAN </i>

32.Describe font size and font color and font face tags in HTML.

Font Size <font size= "?"></font> tags are used to change the font size. Replace the ? Symbol with a number in the range 1 to 7. 1 is the smallest and 7 is the largest font size.

Example <font size= "7"> WORLD WIDE WEB </font>

Font Color <front color="?"></front> tags are used to change the color of text that is within the tags. Replace the ? symbol with color such as black, blue brown, gray, green, maroon, orange, pink, red white, yellow, etc.

Example <font color= "blue"> WORLD WIDE WEB </font>

Font Face <font face= "?"></font> tags are used to change the font face of text that is within the tags. Replace the ? symbol with font face such as arial, courier, calibri,Times new times roman, etc.

Example <font face= "arial"> WORLD WIDE WEB </font>

33.What is the purpose of alt attribute?

If for some reason the browser cannot display an image, the user can insert the alt attribute in the <img> tag to tell the reader what image is missing in the page. The value of the alt attribute provides alternative text in place of image in the Web page.

34.How do we apply background image in a webpage?

An image can be set as background of a page using the background attribute in the <body> tag.

Example <body background = "image.jpg">

35.How do we set background and foreground colors of the web page?

The bgcolor attribute of <body> tag specifies the background color of a document and text attribute specifies the foreground text color of the webpage.

Example <body bgcolor="#E6E6FA" text="red">
<h1>Hello world!</h1>
</body>

36.Which tag is used for table?

<table></table> tags are used for table.

37.What is metadata?

Metadata is data(information) about data. Metadata will not be displayed on the page, but will be machine parsable.