Basic HTML with respect to class 8
Writing Html Documents –
With respect to class 8 HTML, where to Write Html Code
Structure of HTML Document
Html Elements with respect to class 8 computer lessons
HTML container elements require a starting as well as an ending tag. Some
Examples of container elements are:
Attributes of HTML
Background color, Text Color, Link Color
By default, browsers display text in black.
With respect to class 8 computer lessons, if you want to change the color or text (by TEXT attribute), color of links (by LINK attribute), color of active links (by ALINK attribute) and background color (by BGCOLOR attribute ).
Consider the following:
- The background color is teal. (bgcolor = “teal”)
- Text color is magenta.
- Links that have not been visited recently are made yellow (link = “yellow”)
- Links that are currently being clicked on (alink = “lime”)
With respect to class 8 computer lessons, it lets you change the size, style and color of the text – It is generally used for changing the appearance of a short segment of text.
Attributes of tag
(i) size: used to specify the size of the text.
(ii) color: used to change the color of text.
(iii) face: used to change the way of displaying text.
Problem: With respect to class 8 HTML, to display a paragraph on red color in size 4 but its first letter should be of size 7 and of blue color.
sing the largest font
- With respect to class 8 HTML, this tag lets you define the basic size for the font, the browser will use to render normal document text.
size – its value determines the document’s base font size. It has value between 1 and 7
Problem: To display text by changing base font sizes.
This text is being displayed in default font size as no base font size has been set as yet.
This text has base font size =5.
Headings: These are defined with the
This is a paragraph aligned to the left side
This is another paragraph with center alignment
Note: Each paragraph has to be enclosed within angle bracket, failing to do will become one large paragraph. HTML automatically adds an extra blank line before and after a paragraph.
- To end one line, and to jump to the next
tag is used.
Writing a line. I want to write in next line.
I am in a new line.
- To centralize a segment of text, just type the text between
For example, the code
Will make text – This is centralized – appear centralized on browser window.
tag produces a horizontal line spread across the width of the browser window.
This attribute allows you to set the size of the horizontal rule.
This attribute allows you to set the size of the horizontal rule. Width Attribute of
The length of horizontal rules can be controlled with width attribute.
Problem: With respect to class 8 computer lessons, to display horizontal rules of different widths:
Width of Horizontal Rule
The following two rules have widths of 100 and 200 pixels respectively
Comments <!.... and …..>
- Comment are one type of textual content which appear in your HTML
code, but are not rendered by user’s browser.
- Comments are given between special characters.
- Browsers ignore the text between comment characters.
Line Breaks –
is a para
graph with line breaks
The below-given lines show the output of the above syntax:
is a para
graph with line breaks
tag has no closing tag.
The lines that are given above – To set background-color black.
HTML Colors –
HTML Lists –
Unordered Lists –
This Code Would Display
Ordered Lists –
This Code Would Display
HTML Links – HTML uses the anchor tag to create a link to another document or web page.
Email Links – To create an email link, you will use mailto: plus your email address.
To add a subject for the email message, you would add ?subject= after the email address.
HTML Images –
The syntax of defining an image:
Recap with respect to class 8 HTML
Hyper Text Markup Language is abbreviated as HTML, to design web pages.
Which of the following is a paired tag?
|a)||<||| ||| img ||| |||>|
|b)||<||| ||| br ||| |||>|
|c)||<||| ||| b ||| |||>|
|d)||<||| ||| hr ||| |||>|
URL of the image is specified in __________.
Which of the following is not an attribute of <||| ||| img ||| |||> ?
Which tag is used to scroll the text in the specified direction?
<||| p |||>By default, in which direction does the text scroll in marquee tag?<||| /p |||>
|a)||<||| p |||>left to right<||| /p |||>|
|b)||<||| p |||>right to left<||| /p |||>|
|c)||<||| p |||>top to bottom<||| /p |||>|
|d)||<||| p |||>bottom to top<||| /p |||>|
<||| p |||>Which attribute is used to change the direction of scrolling?<||| /p |||>
|a)||<||| p |||>scroll<||| /p |||>|
|b)||<||| p |||>direction<||| /p |||>|
|c)||<||| p |||>alt<||| /p |||>|
|d)||<||| p |||>None of theabove.<||| /p |||>|
Which of these tags indicates the begining of HTMl program?
|a)||<||| ||| HTML ||| |||>|
|b)||<||| ||| Title ||| |||>|
|c)||<||| ||| /HTML ||| |||>|
|d)||<||| ||| Head ||| |||>|
Which of the following is true?
|a)||Ordered list is unnumbered list|
|b)||Type is an attribute of <||| ||| li ||| |||>|
|c)||Unordered list items are presented with the bullets.|
|d)||<||| ||| ol ||| |||> is an empty tag.|
<||| p |||>Table can be inserted using ________.<||| /p |||>
|a)||<||| p |||><||| insert |||><||| /p |||>|
|b)||<||| p |||><||| table |||><||| /p |||>|
|c)||<||| p |||><||| add |||><||| /p |||>|
|d)||<||| p |||>< add table ><||| /p |||>|
Heading in a table can be defined with __________.
|a)||<||| ||| tr ||| |||>|
|b)||<||| ||| td ||| |||>|
|c)||<||| ||| th ||| |||>|
|d)||<||| ||| thead ||| |||>|
Your Score: 0/10
Yearlong program for Olympiads preparation & to build necessary skills for future.Explore More
Time to mark your calendar with the upcoming Olympiads exam schedule.Explore More
Take your Olympiad preparation to next-level by taking LIVE Classes.Explore More
Assess your performance by taking topic-wise and full length mock tests.Explore More
Know your true potential by participating in Unicus Olympiads for classes 1-11.Explore More
Give wings to your innovation by appearing in CREST Olympiads for Prep/KG to classes 1-10.Explore More