Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 29 - 2606_PlugGPT_C7_Flipbook
P. 29

    Syntax for defining a common style for more than one HTML tag.

                     <HEAD>

                     <STYLE>

                         Tag1_name, Tag2_name, Tag3_name and so on
                                 {

                                   Property1_name: value;

                                   Property2_name: value;

                                   -      -

                                   -      -

                                   }

                     </STYLE>
                     </HEAD>

                     Write HTML codes to use border property for defining a common style for more than one HTML
                     tag.

                     <!DOCTYPE html>

                     <HTML>
                     <HEAD><TITLE>A Simple Table Structure</TITLE>

                     <STYLE>
                     TABLE,TH,TD

                     {
                     border:2px solid black;

                     }
                     </STYLE>

                     </HEAD>

                     <BODY>
                     <TABLE>

                     <CAPTION>STUDENT'S DETAILS</CAPTION>
                     <TR>

                     <TH>ADMISSION</TH>
                     <TH>NAME</TH>

                     <TH>TOTAL MARKS</TH>
                     </TR>

                                                                                              Lists and Tables in HTML5  27

| 24 25 26 27 28 29 30 31 32 33 34 |