HTML NOTES
CLASS VII
HTML Anchor
The HTML anchor tag defines a hyperlink that links one page to another page.
The syntax of HTML anchor tag is given below.
<a href = "..........."> Link Text </a>
EXAMPLE
<html>
<head>
<title></title>
</head>
<body>
<a href="[Link] </a>For More Info Click here
</body>
HTML Image
HTML img tag is used to display image on the web page. HTML img tag is an empty tag that contains
attributes only, closing tags are not used in HTML image element.
Syntax of <img> tag:
<img src= "url">
EXAMPLE
<h2>HTML Image Example</h2>
<img src="good_morning.jpg" alt="Good Morning Friends"/>
HTML Ordered List | HTML Numbered List
HTML Ordered List or Numbered List displays elements in numbered format.
HTML Ordered List Example
<ol>
<li>HTML</li>
<li>Java</li>
<li>JavaScript</li>
<li>SQL</li>
</ol>
HTML Unordered List | HTML Bulleted List
HTML Unordered List or Bulleted List displays elements in bulleted format .
HTML Unordered List Example
<ul>
<li>HTML</li>
<li>Java</li>
<li>JavaScript</li>
<li>SQL</li>
</ul>
HTML Table
HTML table tag is used to display data in tabular form (row * column).
1. <table border="1">
2. <tr><th>First_Name</th><th>Last_Name</th><th>Marks</th></tr>
3. <tr><td>Sonoo</td><td>Jaiswal</td><td>60</td></tr>
4. <tr><td>James</td><td>William</td><td>80</td></tr>
5. <tr><td>Swati</td><td>Sironi</td><td>82</td></tr>
6. <tr><td>Chetna</td><td>Singh</td><td>72</td></tr>
7. </table>
Ques/Ans.
Q1) Write about Body tags with all its attributes.
Ans 1. The <body> tag contains all the visible content, such as text, images, links, videos, and more.
Everything that we see on a webpage is inside the <body> tag.
Syntax of <body> Tag
<body>
<h1>Welcome to My Webpage</h1>
<p>This is a paragraph inside the body tag.</p>
</body>
Attributes of <body> Tag
Attributes are special properties that change the way the body appears on a webpage.
1. background – It sets an image as the background of the webpage.
<body background="[Link]">
2. bgcolor – It sets the background color of the webpage.
<body bgcolor="lightblue">
3. text – It changes the color of the text inside the <body> tag.
<body text="black">
Q2) Write about Font tags with all their attributes.
Ans. The <font> tag in HTML is used to change the text's size, color, and style.
Syntax of <font> Tag
<font size="5" color="blue" face="Arial">Hello, World!</font>
Attributes of <font> Tag
1. size – It changes the size of the text.
o The value can be between 1 (smallest) to 7 (largest).
o Example:
<font size="4">This is medium-sized text.</font>
2. color – It sets the text color.
o Example:
<font color="green">This text is green.</font>
3. face – It changes the font style (typeface).
o Example:
<font face="Verdana">This text is in Verdana font.</font>
Q3. Which are the tags, and their attributes, that are used to create an ordered list?
Ans.
1. <ol> (Ordered List) Tag
This tag is used to define an ordered list. The list items will be displayed in a sequence (like 1, 2, 3 or
A, B, C).
2. <li> (List Item) Tag
Each item inside the ordered list is created using <li>.
Q4) Which is the tag used to insert an Image in a web page?
Ans. HTML img tag is used to display image on the web page. HTML img tag is an empty tag that
contains attributes only, closing tags are not used in HTML image element.
Syntax of <img> tag:
<img src= "url">
Q5) How are new rows and table headings create in a table?
Ans. HTML table tag is used to display data in tabular form (row * column).
1. <table border="1">
2. <tr><th>First_Name</th><th>Last_Name</th><th>Marks</th></tr>
3. <tr><td>Sonoo</td><td>Jaiswal</td><td>60</td></tr>
4. <tr><td>James</td><td>William</td><td>80</td></tr>
5. <tr><td>Swati</td><td>Sironi</td><td>82</td></tr>
6. <tr><td>Chetna</td><td>Singh</td><td>72</td></tr>
7. </table>
Q6) How do you create hyperlinks? Write down the tags and attributes used.
Ans. HTML Anchor
The HTML anchor tag defines a hyperlink that links one page to another page.
The syntax of HTML anchor tag is given below.
<a href = "..........."> Link Text </a>
EXAMPLE
<html>
<head>
<title></title>
</head>
<body>
<a href="[Link] </a>For More Info Click here
</body>