Computer CH-4 Introduction to HTML (Notes & MCQ)

 

CH-4 Introduction to HTML

HTML -HTML is an abbreviation of Hyper Text Markup Language. It is the language used to create web pages.

 

Web Browsers-You can view an HTML file as a web page only in a Web browser. E.g. Internet Explorer, Mozilla Firefox and Google Chrome.

 

Creating a web page -A web page is a file with a .html or .htm extension.

 

Paired Tags

A tag which has an opening and closing pair is called a container tag. For example, <i>Sentence</i>

 

Unpaired Tags

There are some other tags which do not have a corresponding closing tag. They are called empty tags.

For example, <br>, <hr>

 

Creating Headings

         <H1>…</H1>Formats the text enclosed as the largest heading.

         <H6>…</H6>Formats the text enclosed as the smallest heading.

 

<P>…</P> Creates a paragraph of the text.

<center>…</center> Makes the text appear at the center of the page.

<BR>inserts a single line break.

 

Formatting Tags

         <B>…</B>Makes the text enclosed inside it appear bold.

         <U>…</U>Make the text enclosed inside it underlined.

         <I>…</I>Make the text enclosed inside it appear in italics format

         <SUP>…</SUP>Makes the text enclosed inside it, appear as superscript.

         <SUB>…</SUB>Make the text enclosed inside it, appear as subscript

         Comment <!...> tag -Comments are codes that are not executed by the browser; therefore, they are not shown in the web page

 

Elements and Attributes

         Elements:  Tags in HTML are also called elements.

         Attributes:   A tag can have additional parts called attributes. These attributes help to change specific features of the tag.

 

Attributes of <font> tag

·         face : It is used to change the font of the text.     

·         size : It is used to set the size of the displayed text.

·         color : It is used to set the colour of the line.

 

Attributes <HR> tag

·         ALIGN : Specifies the alignment of the horizontal line.  

·         WIDTH : Specifies the width of the line. Can be given in percentage or pixels.

·         SIZE : Specifies the height or thickness of the rule in pixels.      

·         COLOR : Specifies the colour of the line.

·         NOSHADE :   Specifies that the line should not be shaded         but shown in one colour.

 

Attributes of <p> tag-The <p> tag has an align attribute to specify the alignment of text.

The align attribute has four values:

  • Left - It is used to move the paragraph to the left.
  • Right - It is used to move the paragraph to the right.
  • Center - It is used to place the paragraph to the center of the page.
  • Justify - It is used to stretch the lines so that each line has equal width
  •  

Ordered List- In ordered list, the points are numbered in sequence.

·         type : The type attribute specifies the type of numbering.

·         start : The start attribute specifies the number of the first point in the list.

 

Unordered List -In unordered list, the points are bulleted.

·         type : The type attribute specifies the type of numbering.

 

Definition List -A definition list is a list of terms along with their definition or description

Nested Lists -Lists contained inside an outer list are called nested lists



Extra MCQ and Q&A

1.      What is the full form of HTML?

a) Hype Text Madeup Language

b) Hyper Text Markup Language

c) High Text Markup Language

d) Hyper Tele Markup Language

 

2.      _____________ is example of web browser.

a) Google Chrome

b) OpenOffice Calc

c) Microsoft Windows

d) Tux

 

3. What is the extension of web pages?

a) .web

b) .page

c) .html

d) .http

 

4. Choose the correct HTML tag to make a text bold.

a)<bb>

b)<bolds>

c)<b>

d)<bold

 

5. Each list item in an ordered or unordered list has         tag.

a) <li>

b) <ol>

c) <dd>

d)<list>

 

6. Which tag is used to format largest heading?

a) <h6>

b) <h2>

c) <h4>

d)<h1>

 

7. Which tag is used to break the line into HTML?

a) <br>

b) <break>

c) <b>

d) <brk>

8. Meera wants to change the background colour of her website to blue. Which tag can she use to do the same?

a) <body bgcolor=”blue”>

b) <font color=”#008000”>

c) <font color=blue>

d) <bgcolor=”blue”>

 

9. Write down features of HTML.

 

10. Write note on attribute of Body tag.

 

Post a Comment

0 Comments