Please refer to Links and CSS in HTML Class 10 Computer Science Exam Questions provided below. These questions and answers for Class 10 Computer Science have been designed based on the past trend of questions and important topics in your class 10 Computer Science books. You should go through all Class 10 Computer Science Important Questions provided by our teachers which will help you to get more marks in upcoming exams.
Class 10 Computer Science Exam Questions Links and CSS in HTML
Class 10 Computer Science students should read and understand the important questions and answers provided below for Links and CSS in HTML which will help them to understand all important and difficult topics.
Short Answer Type Questions
Question: Explain the given command <A href =”wild.html”>Click Here for wild animals </A>
Answer: In this command, anchor <A> tag and its href attribute is included. The text (Click Here for wild animals) will appear underlined and indicates that clicking the text activates the hypertext link. The address of the referenced document can be specified by an absolute or a relative URL.
Thus, ‘‘wild.html’’ is an URL or web page address and Click Here for wild animals is the hyperlinked text.
Question: Explain the need of linking between web pages.
Answer: Linking between different web pages is required, as when we create websites, different html files (web pages)
are created. These files contain different modules and cannot be open individually. If we link between them,the website becomes more productive and informative.
Question: Name the attributes of <A> tag which are used for internal linking in a web page.
Answer: The attributes of <A> tag which are used for internal linking in a web page as follows
(i) href is used to specify the URL of the segment the link goes to.
(ii) name gives the name to the segment.
Question: How is external linking different from internal linking?
Answer: External link is a type of linking that goes to another website. It is a linking of two different documents.
While, internal linking is a type of linking that links pages within a single website, various sections of same document or different documents.
Question: Gaurav, a web designer in a company named “International Designers” has just created a web page in which different sections of the web page are linked and can be traversed by clicking on the text given as “Top”, “Middle” and “Bottom”. Is the internal linking or external linking and why?
Additionally tell him about the suitable tag and its attribute(s) to open another web page named ‘second.html’ by clicking on the text “Next”.
Answer: It is internal linking because links pages are within a single website, various sections of same document or different documents.
To open another web page, user will be need to use external linking with <A> tag and href attribute.
Suitable code to open web page named ‘Second.html’ <A href=“second.html ”> Next </A>
Question: Write an simple HTML code to show an example of internal linking.
<H1> It is <A name =”top”>top</A>
of the page </H1>
<H1><A href =”#top”>Top</A></H1>
Question: Write the HTML code to create a link for school.jpg located at C:\.
<A href = “C:\school.jpg”>Image</A>
Question: Write an HTML code to show the use of mailto function.
<TITLE> Use of mailto </TITLE>
<BODY>Send your views to
<A href= “mailto:firstname.lastname@example.org”>
Question: What is the purpose of mailto function?
Answer: The mailto function is used to send E-mail messages to multiple recipients. For this, we only need to type the E-mail address of the recipients in the same link separated by commas.
Question: Write the HTML code to send an E-mail to email@example.com from your web page.
Question: Explain id selector in CSS.
Answer: id selector is used to apply the style to an element based on the id of an element.
color : #FFFFFF;
In the above code, all the elements having id.‘‘elementid’’ will have the color white.
Question: Explain the cascading style sheet.
Answer: Cascading Style Sheet referred to as CSS, is a simple design language intended to simplify the process of making web pages presentable. CSS handles the look and feel part of a web page using CSS, you can control the color of the text, the style of fonts, the spacing between paragraphs, layout designs etc. CSS is easy to learn and understand but it provides powerful control over the presentation of an HTML document. Most commonly, CSS is combined with the markup languages HTML or XHTML.
Question: Write about the following attribute of <AUDIO> tag.
(i) autobuffer (ii) loop(iii) type
Answer: (i) autobuffer This boolean attribute if specified, the audio will automatically begin buffering even if it is not set to automatically play.
(ii) loop This boolean attribute if specified, will allow audio automatically see back to the start after reaching at the end.
(iii) type This attribute specifies the audio file standard type.
Question: Define margin property of CSS.
Answer: The CSS margin properties are used to create space around elements, outside of any defined borders. CSS has properties for specifying the margin for each side of an element; margin-top, margin-right, margin-bottom,margin-left.
Question: Write a code to display the text ‘‘Contact Us’’
should be linked with firstname.lastname@example.org E-mail id.
<A href = “mailto:email@example.com”> Contact Us </A>
Question: Explain class selector in CSS.
Answer: The class selector selects elements with a specific class attribute. To select elements with a specific class, write a period (×) character, all HTML elements with class = “center” will be red and center aligned.
Question: Write a code to link www.google.com page with text Click Here and also show that title as “It is a hyperlink”.
<A href = “http ://www.google.com”
title = “It is a hyperlink”> Click Here </A>
Question: Differentiate between internal CSS and external CSS.
Answer: Internal CSS are the ones that we can write within the same file, i.e. the HTML code and CSS code are placed in the same file.
While external CSS are that we can write in a separate file than the html code, i.e. the HTML file is separate and CSS file is separate.
Long Answer Type Questions
Question: Write the code using CSS to display following output.
<STYLE type = “text/css”>
<H2 id = “para1”>Reaction of
Magnesium with Hydrochloric Acid</H2>
<B> The equation for the reaction
Magnesium+Hydrochloric Acid =
Magnesium Chloride + Hydrogen <BR>
Question: What is the use of external style sheet? Explain its advantages and disadvantages.
Answer: With an external style sheet, you can change the look of the entire website by changing just one file. Each page must include a reference to the external style sheet, file inside the <LINK> element.
The <LINK> element goes inside the <HEAD>section. An external style sheet can be written in any text editor. The style sheet file must be saved with a .css extension.
The advantages of external style sheet are as follows
(i) With the help of external style sheets, the styles of numerous documents can be organised from one single file.
(ii) In external style sheets, classes can be made for use on numerous HTML element types in many forms of the site.
(iii) In complex contexts, methods like selector and grouping can be implemented to apply styles.
The disadvantages of external style sheet are as follows
(i) An extra download is essential to import style information for each file.
(ii) The execution of the file may be delayed till the external style sheet is loaded.
(iii) While implementing style sheets, we need to test web pages with multiple browsers in order to check compatibility issues.
Question: Sushila, a web designer working with Global Designers, is supposed to design a web page shown below
Write the HTML code to design the above shown web page considering the specifications as given below
(i) Background color of the page should be pink and all the hyperlinked text should be green in color.
(ii) Image named “taj.jpg” should be placed in the centre of the web page.
(iii) Heading “The Taj Mahal” should be first level of the heading and underlined.
(iv) Paragraph should have following formatting styles applicable Color-Blue Size-5 Font style-Times New Roman(v) At the bottom of the page, “Contact Us” text should be linked with firstname.lastname@example.org E-mail id.
<IMG src=”taj.jpeg” height=”100″
<H1><U>The Taj Mahal</U></H1>
<P><FONT color=”blue”size=”5″ face=”Times
The Taj Mahal is a world famous white marble<BR>
monument located on the Yamuna river bank in
the Indian historical city of Agra.
<FONT color = “green”>
<A href = “mailto:email@example.com”>
Question: Carefully study the web page given below. Identify 10 tags (structural as well as formatting tags) that have been utilised in creating this web page and write the usage of each of them.
Answer: Following tags are used
(i) <HTML> Container of all the HTML elements. Tells
the browser that it is dealing with an HTML document.
(ii) <BODY> It defines the document’s body. It contains
all the necessary contents of HTML document that is to be displayed on web browser.
(iii) <H1> Top level of heading.
(iv) <CENTER> Used to centralise a segment of text to be displayed.
(v) <P> It is used to define the paragraph.
(vi) <OL> To insert an ordered list in the web page.
(vii) <LI> It is used to indicate a list item as contained in an ordered.
(viii) <BR> Break line tag is used to move all the
text/image that follows the tag to the next line.
(ix) <IMG> This tag is used to insert the desired image into the web page.
(x) <A> Anchor tag is used to create the hyperlink.
Question: Observe following output and write HTML code to generate it.
Consider the following points while generating the web page
(i) The title of the page is “FOOTBALL CLUB”
(ii) The heading is blue color
(iii) Font of entire document is arial
(iv) Image used is “football.jpeg”
(v) The page is linked to:
Proud history to “history.html”
(vi) Bottom message is of size 2.
Answer: The code is
<FONT face=”arial” size=”3″>
<H1 align=”center”><FONT color=”blue”>FOOTBALL
<CENTER><IMG src=”football.jpg” height=”150″
<H3>Welcome to the website of the Manchester Football
<P>The Manchester Football Club is based in United States
of America and has a long <BR>
and <A href=”history.html”>proud history</A>. We have several teams in various age groups from kids to grown-<BR>ups so there is a team to suit any player.
<U>This year’s motto:</U><BR>
We are the BEST:<BR>
<HR size=”3″ noshade size =”75%”>
<FONT size=”2″><B>If you have any questions about us,
send us a mail at firstname.lastname@example.org</B></FONT><BR>
<IMG src=”copy.jpg” height=”20″ width=”30″>Manchester
Football Club. Last updated
Question: Observe the following web page and write HTML code to generate it.
Note The following points while generating the web page:
(i) Background color of page is yellow.
(ii) Link color is black and visited link color is green.
(iii) Font style for the page is arial.
(iv) Heading of the page is maroon.
(v) Image used is gov.jpeg.
(vi) Text color of the paragraph is red.
(vii) Link for ‘National e-Governance Plan’ is nation.html.
(viii) E-mail id for bottom message is email@example.com.
Answer: The HTML code is
<BODY bgcolor=”yellow” link =”black”
<BASEFONT face = “arial”>
National e-Governance Plan</H1>
<P> <FONT color=”red”>
<IMG src=”gov.jpeg” alt=”gov” align=”right”>
The National e-Governance Plan of Indian Government seeks to lay the foundation and provide the impetus for long-term growth of e-Governance within the country.
The plan seeks to create the right governance and institutional mechanisms, set up the core infrastructure and policies and implementation of a number of Mission Mode Projects at the center, state and integrated service levels to create a citizen-centric and business-centric environment for governance.
<B>Visit<A href =”nation.html”>
National e-Governance Plan</A> to know
<OL type =”1″>
<A href=”mailto:firstname.lastname@example.org”>Mail to us
Question: Write the HTML code to display the following output.
Note The following points while generating the web page:
(i) Title of the page should be “Dubai Tourism”.
(ii) The heading text “WELCOME TO DUBAI” is in arial font and is of maroon color.
(iii) The horizontal lines below the heading are 5 pixels thick and of red color.
(iv) Image used in the page is burj.jpg.
(v) The bulleted list contains links as specified below The text Morning is a link to the web page “morning.html”
The text Evening is a link to the web page “evening.html”
Answer: The HTML code is
<FONT face=”arial” color=”maroon”>
WELCOME TO DUBAI</FONT>
<HR width=80% size=”5″ color=”red”
<HR width=60% size=”5″ color=”red”
Enjoy the world of pure travel masti
<IMG src=”burj.jpg” align=”bottom”
The following is alist of major tourist
attractions in Dubai:<BR><BR>
Question: Write an HTML code to display the following output.
Consider the following points while writing the code
(i) Title of the page is “The Computer World”.
(ii) Background color of the page is “Yellow”.
(iii) Active link color is Green and Visiting link color is Red.
(iv) All font face in the page is Verdana but heading is in Arial and Black.
(v) Image is from the file “computer.jpg”.
(vi) Use horizontal rule wherever required.
(vii) Use ordered and unordered lists wherever required.
(viii) The pages are linked as follows
Super Computers Super.html
Mainframe Computers Main.html
Mini Computers Mini.html
Micro Computers Micro.html
Note: You can use any other attributes that are not mentioned above to produce a similar output.
Answer: The HTML code is
<TITLE>The Computer World</TITLE>
<BODY bgcolor=”yellow” alink=”green”
<CENTER>The Computer World</CENTER>
Types of Computer
Super Computers </A></LI>
</UL> </OL> <HR>
For further information visit
We hope you liked the above provided Links and CSS in HTML Class 10 Computer Science Exam Questions. If you have any further questions please put them in the comments section below so that our teachers can provide you an answer.