Computer Science, asked by sunakat483, 11 months ago

2.
Write the HTML tags to do the following.
a. Add a row in a table
b. Insert an image in a web page
c. Create an unordered list
d. To define a cell in the row of a table
e. Create a hyperlink​

Answers

Answered by saiprathumnan35
1

Answer:

Explanation:

The HTML table model allows authors to arrange data -- text, preformatted text, images, links, forms, form fields, other tables, etc. -- into rows and columns of cells.

<TABLE border="1"

         summary="This table gives some statistics about fruit

                  flies: average height and weight, and percentage

                  with red eyes (for both males and females).">

<CAPTION><EM>A test table with merged cells</EM></CAPTION>

<TR><TH rowspan="2"><TH colspan="2">Average

   <TH rowspan="2">Red<BR>eyes

<TR><TH>height<TH>weight

<TR><TH>Males<TD>1.9<TD>0.003<TD>40%

<TR><TH>Females<TD>1.7<TD>0.002<TD>43%

</TABLE>

might be rendered something like this on a tty device:

         A test table with merged cells

   /-----------------------------------------\

   |          |      Average      |   Red    |

   |          |-------------------|  eyes    |

   |          |  height |  weight |          |

   |-----------------------------------------|

   |  Males   | 1.9     | 0.003   |   40%    |

   |-----------------------------------------|

   | Females  | 1.7     | 0.002   |   43%    |

   \-----------------------------------------/

or like this by a graphical user agent:

A table with merged cells

11.2 Elements for constructing tables

11.2.1 The TABLE element

<!ELEMENT TABLE - -

    (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>

<!ATTLIST TABLE                        -- table element --

 %attrs;                              -- %coreattrs, %i18n, %events --

 summary     %Text;         #IMPLIED  -- purpose/structure for speech output--

 width       %Length;       #IMPLIED  -- table width --

 border      %Pixels;       #IMPLIED  -- controls frame width around table --

 frame       %TFrame;       #IMPLIED  -- which parts of frame to render --

 rules       %TRules;       #IMPLIED  -- rulings between rows and cols --

 cellspacing %Length;       #IMPLIED  -- spacing between cells --

 cellpadding %Length;       #IMPLIED  -- spacing within cells --

 >

Start tag: required, End tag: required

Attribute definitions

summary = text [CS]

This attribute provides a summary of the table's purpose and structure for user agents rendering to non-visual media such as speech and Braille.

align = left|center|right [CI]

Deprecated. This attribute specifies the position of the table with respect to the document. Permitted values:

left: The table is to the left of the document.

center: The table is to the center of the document.

right: The table is to the right of the document.

<TR>

  <TD>J. Dinnen</TD>

  <TD>5</TD>

  <TD>Decaf</TD>

  <TD>Yes</TD>

</TABLE>

In the following example, the user agent should show borders five pixels thick on the left-hand and right-hand sides of the table, with rules drawn between each column.

<TABLE border="5" frame="vsides" rules="cols">

<TR> <TD>1 <TD>2 <TD>3

<TR> <TD>4 <TD>5 <TD>6

<TR> <TD>7 <TD>8 <TD>9

</TABLE>

The following settings should be observed by user agents for backwards compatibility.

Setting border="0" implies frame="void" and, unless otherwise specified, rules="none".

Other values of border imply frame="border" and, unless otherwise specified, rules="all".

<TABLE border="2">

<TABLE border="2" frame="border" rules="all">

as are the following:

<TABLE border>

<TABLE frame="border" rules="all">

Note. The border attribute also defines the border behavior for the OBJECT and IMG elements, but takes different values for those elements.

11.3.2 Horizontal and vertical alignment

The following attributes may be set for different table elements (see their definitions).

<!-- horizontal alignment attributes for cell contents -->

<!ENTITY % cellhalign

 "align      (left|center|right|justify|char) #IMPLIED

  char       %Character;    #IMPLIED  -- alignment char, e.g. char=':' --

  charoff    %Length;       #IMPLIED  -- offset for alignment char --"

 >

<!-- vertical alignment attributes for cell contents -->

<!ENTITY % cellvalign

 "valign     (top|middle|bottom|baseline) #IMPLIED"

 >

 abbr attribute.

Here is the same example substituting the scope attribute for the headers attribute. Note the value "col" for the scope attribute, meaning "all cells in  the current column":

<TABLE border="1"  

      summary="This table charts the number of cups

               of coffee consumed by each senator, the type  

               of coffee (decaf or regular), and whether  

               taken with sugar.">

<CAPTION>Cups of coffee consumed by each senator</CAPTION>

<TR>

  <TH scope="col">Name</TH>

  <TH scope="col">Cups</TH>

  <TH scope="col" abbr="Type">Type of Coffee</TH>

  <TH scope="col">Sugar?</TH>

<TR>

les attributes tell the user agent which borders and rules to render.

Similar questions