PRACTICALS ( TERM 2) CLASS X

PROGRAM1. Write HTML Code to generate the following table:-

 

<html>

<head> 

<title> table tag </title>

</head>

<body>

<table border="2" bordercolor="blue" height=150, width=100>

<tr>

<td width="45"> one </td>

<td bgcolor="yellow"> two </td>

</tr>

<tr>

<td bgcolor="red"> three </td>

<td  background="C:\Users\stk\Desktop\baudh.jpg"> four </td> 

</tr>

</table>

</body>

</html>


PROGRAM 2:-

Write a program to display use of CELLSPACING and CELLPADDING attributes.


<html>

<head> 

<title> Cellpadding and cellspacing </title>

</head>

<body>

<table border="3" cellspacing="10" cellpadding="1">

<tr>

<td align="center"> monica </td>

<td align="center"> caroline </td>

</tr>

<tr>

<td align="center"> mona </td>

<td align="center"> sona </td>

</tr>

</table>

</body>

</html>


output:-

PROGRAM 3. 
Write a program to display use of ROWSPAN attributes.

<html>
<head> 
<title> ROWSPAN </title>
</head>
<body>
<table border="2" >
                  <tr>
<td> item1  </td>
<td rowspan=3> item2 </td>
</tr>
<tr>
<td> item3 </td>
</tr>
</table>
</body>
</html>

output:-



PROGRAM 4. 
Write a program to display use of COLSPAN attributes.

<html>
<head> 
<title> ROWSPAN </title>
</head>
<body>
<Table border="2">
<tr>
<td colspan=2 > item1  </td>
</tr>
<tr>
<td > item2 </td>
<td> item3 </td>
</tr>
</table>
</body>
</html>

output:-



PROGRAM 5. 
Write a program to set up a link to other part of same document.(Internal linking)
<head> 
<title> Internal Linking </title>
</head>
<body>

<A href="#computer"> link to the computer </A>

What is Climate Change?

Climate change is a long-term change in the average weather patterns that have come to define Earth’s local, regional and global climates. These changes have a broad range of observed effects that are synonymous with the term.

Changes observed in Earth’s climate since the early 20th century are primarily driven by human activities, particularly fossil fuel burning, which increases heat-trapping greenhouse gas levels in Earth’s atmosphere, raising Earth’s average surface temperature. These human-produced temperature increases are commonly referred to as global warming. Natural processes can also contribute to climate change, including internal variability (e.g., cyclical ocean patterns like El Niño, La Niña and the Pacific Decadal Oscillation) and external forcings (e.g., volcanic activity, changes in the Sun’s energy output, variations in Earth’s orbit).

Scientists use observations from the ground, air and space, along with theoretical models, to monitor and study past, present and future climate change. Climate data records provide evidence of climate change key indicators, such as global land and ocean temperature increases; rising sea levels; ice loss at Earth’s poles and in mountain glaciers; frequency and severity changes in extreme weather such as hurricanes, heatwaves, wildfires, droughts, floods and precipitation; and cloud and vegetation cover changes, to name but a few.

CREATE THE LINK TO THE FRAGMENT 
<A name="computer">computer</A> 
</BODY>
</HTML>

PROGRAM 6. 
Write a program to set up a link to connect two documents.(External linking)


<html>
<head> 
<title> external linking</title>
</head>

<body>
<A href="file:///D:/sadhu%20singh/Externallink.html"> Click here </A>

LINKING 
HYPERLINK- is a link from a hypertext file to another document, file or location.

1. External linking- Linking two different documents. 
2. Internal linking- Linking the various section of the same document.
</body>
</html>



output


Program 7 Write a program to display various table sections using THEAD, TBODY & TFOOT tags.
<html>
<head>
<title> thead tbody tfoot </title>
</head>
<table border>
<thead bgcolor="green">
<tr> 
<td> rohit sharma </td>
<td> virat </td>
</tr>
</thead>
<tbody bgcolor="red">
<tr> 
<td> dhoni </td>
<td> sachin </td>
</tr>
</tbody>
<tfoot bgcolor="yellow">
<tr> 
<td> rahul </td>
<td> pant </td>
</tr>
</tfoot>
</table>

output:-



8. external
save file with default.html

<html>
<head>
<title> my document </title>
<link rel="stylesheet" type="text/css" href="ss.css"/>
</head> 
<body>
<h1> my stylesheet page </h1>
</body>
</html>

second file 
save file with
ss.css
body {background-color:blue;}
h1{color:yellow;}

9. INLINE

<HTML>
<HEAD>
<TITLE> Inline </TITLE>
</HEAD>
<BODY STYLE="BACKGROUND-COLOR:RED;">
<P> THE BACKGROUND IS RED </P>
</BODY>
</HTML>

10. INTERNAL 

<html>
<head>
<title> Internal </title>
</head>
<Style type="text/css"> 
body{background-color:red;}
</style>
</head>
<body>
<p> the background is red </p>
</body>
</html>









Comments

  1. Dear students
    After completing your work in practical file.
    Please comment here.

    ReplyDelete
  2. Html
    head
    /head
    body>
    tr>
    table border=2>
    td rowspan=3> group A /td>
    td> dancing /td>
    td> singing /td>
    td> art /td>
    /tr>
    /body>
    /html>

    ReplyDelete
  3. (HTML)
    (HEAD)
    (TITTLE)Creating Tables(/TITTLE)
    (/HEAD)
    (BODY)
    (TABLE BORDER="1")
    (TH)Activities(/TH)
    (TR)
    (TD) ROWSPAN=3> Group A (/TD)
    (TD>Dancing(/TD)
    (TD)Singing(/TD)
    (TD)Yoga(/TD)
    (/TR)
    (/TABLE)
    (/BODY)
    (/HTML)

    ReplyDelete
  4. html
    head
    titleROWSPAN /title
    head
    body
    table border="2"
    Group A
    tr
    td rowspan=3 Singing td
    tr
    tr
    tdyoga td
    tr
    table
    body
    html

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Html
      Head
      Title /Title
      /Head
      Body
      Table border= 3
      TR
      TD colspan= 4 Computer Applications class 10
      /TR
      TR
      TD Student name /TD
      TD roll no. /TD
      TD Address /TD
      TD percentage /TD
      /TR
      Tr
      TD Amaya /TD
      TD 1 /TD
      TD shastri nagar /TD
      TD 83 /TD
      /Tr
      /Table
      /Body
      /Html


      Delete

Post a Comment