Question

In: Computer Science

What do the following HTML statements do?                  <body>                 &

What do the following HTML statements do?                  <body>

                                                                                                <head>

                                                                                                <table>

                                                                                                <tr>

                                                                                                <td>

                                                                                               

Solutions

Expert Solution

HTML : Hyper Text Markup Language

  • HTML was designed for web development. It is the standard markup language for web development.
  • Markup language is the way systems communicate with eath other and define the text pocess and presentation. That is the HTML codes are not visible on the resultant web page, only the text is visible.
  • The latest version of HTML is HTML5 (HTML 5.2 ).

Structure of HTMl page :

<!DOCTYPE html>             <!-- specify the use of html 5 -->
<html>                      <!--beginning of html tag -->

<head>                     <!--head tag includes root of document --> 
 
<title>Page Title</title>   <!-- title is included in head tag -->


</head>                     

<body>                            

.
.
. <!-- main content of the page is written in body tag -->
.
.

</body>
</html>                       <!--closing of html tag -->

HTML tags and attributes:

  • <body> : The body tag includes the main content of the html page like images, headings, paragraphs etc.
  • <head> : The head tag includes the metadata information of the html document like title, external css files reference, and other metadata for search engines. The head tag also includes title of the page.
  • < table> : the table tag is used to add table in the document.
  • <tr> : This <tr> tag is used for defining each row in the table.
  • <td> : This <td> tag is used to define table cell in a table. This <td> tag is nested inside <tr> tag.

Html Table :

<!DOCTYPE html>
<html>
<head>
    <!-- style tag is used to style the document inside head tag-->
    <style>             
        td, th {            
  border: 1px solid #dddddd;
  text-align: left;
  padding: 8px;
}
    </style>
</head>
<body>

<h3>Basic HTML Table</h3>

<table style="width:100%">
  <tr>
    <th>FirstName</th>
    <th>Lastname</th>                <!-- <th> tag contains table headers--> 
    <th>Age</th>
  </tr>
  <tr>                               
    <td>Steve</td>                   <!-- <td> tag inside <tr> tag. <td> --> 
    <td>Smith</td>
    <td>30</td>
  </tr>
  <tr>
    <td>John</td>
    <td>Cena</td>
    <td>39</td>
  </tr>
  <tr>
    <td>Jim</td>
    <td>Carry</td>
    <td>50</td>
  </tr>
</table>                            <!-- closing of table tag -->

</body>
</html>

Output of the above Table code:


Related Solutions

HTML mark-up text know the following  HTML tags: · <html> · <body> · <head> · <p> ·...
HTML mark-up text know the following  HTML tags: · <html> · <body> · <head> · <p> · <h1>, <h2>, <h3>, etc… · <a> · <img> · <br> · <hr> · <pre> · <i> · <b> · <em> · <sub> · <ins> · <strong> · <mark> · <cite> · <address> · <abbr> After you have reviewed these HTML tags and developed a sense of how they manipulate the presentation of the mark-up, write a sample page of HTML that briefly goes over...
<!DOCTYPE html> <html> <body> <!-- replace the text below with your name!--> <!-- --> <!-- -->...
<!DOCTYPE html> <html> <body> <!-- replace the text below with your name!--> <!-- --> <!-- --> <title> TYPE YOUR NAME HERE</title> <script> // // A bug collector collects bugs every day for five days. Write a function that keeps // a running total of the number of bugs collected during the five days. The loop // should ask for the number of bugs collected for each day, and when the loop is // finished, the program should display the total...
<!DOCTYPE html> <html> <body> <!-- replace the text below with your name!-->    <!-- -->   ...
<!DOCTYPE html> <html> <body> <!-- replace the text below with your name!-->    <!-- -->    <!-- -->    <title> name </title> <script> // // Write a function that calculates the amount of money a person would earn over // a period of years if his or her salary is one penny the first day, two pennies // the second day, and continues to double each day. The program should ask the // user for the number of years and...
<!DOCTYPE html> <html> <body> <script> // // The colors red, blue, and yellow are known as...
<!DOCTYPE html> <html> <body> <script> // // The colors red, blue, and yellow are known as the primary colors because they // cannot be made by mixing other colors. When you mix two primary colors, you // get a secondary color, as shown here: // // When you mix red and blue, you get purple. // When you mix red and yellow, you get orange. // When you mix blue and yellow, you get green. // // Design a program...
<!DOCTYPE html> <html> <head> <!-- *************************************************************************************** --> <!-- * * --> <!-- * Do not change...
<!DOCTYPE html> <html> <head> <!-- *************************************************************************************** --> <!-- * * --> <!-- * Do not change anything within the <head></head> section of the HTML * --> <!-- * * --> <!-- *************************************************************************************** --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script> <style> .btn{border:1px solid black; padding:5px;display:inline-block} </style> </head> <body> <!-- *************************************************************************************** --> <!-- * * --> <!-- * Nothing to change here in the <body> * --> <!-- * * --> <!-- ***************************************************************************************...
<!DOCTYPE html> <html> <body> <script> // // A car's miles-per-gallon (MPG) can be calculated with the...
<!DOCTYPE html> <html> <body> <script> // // A car's miles-per-gallon (MPG) can be calculated with the following formula: // // MPG=Milesdriven/Gallonsofgasused // // Write a program that asks the user for the number of miles driven and the // gallons of gas used. It should then call a function to calculate and return // the car's MPG and display the result. // function calculateMPG(miles, gas) { ///////////////////////////////////////////////////////////////////////////////// // Insert your code between here and the next comment block. Do not...
Question Block elements v.s. inline elements. <!DOCTYPE html> <html> <head> <style>     body{                      text-
Question Block elements v.s. inline elements. <!DOCTYPE html> <html> <head> <style>     body{                      text-align: center;     }     .textdiv {        background-color: LightSlateGrey;        width: 50%;     }     .imgdiv {                      background-color: PapayaWhip;                   width: 30%;     } </style> </head> <body>     <h2>Center Me</h2>     <p>"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."</p>     <div class="textdiv">                   Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt...
What is HTML?
What is HTML?
BEFORE html <html> <head>       <link rel="stylesheet" type="text/css" href="mystyle98_d.css"> </head> <body>              <p>  
BEFORE html <html> <head>       <link rel="stylesheet" type="text/css" href="mystyle98_d.css"> </head> <body>              <p>     I'm a paragraph, what color am I ?      </p>    <ul>      <li id = "fix"> I'm a list item;what color am I? </li>        </ul> <div class = "central1"> <p class ="above"> I'm a paragraph; what color am I? </p>      <p>     I'm another paragraph, what color am I ?      </p>    <ol>      <li id = "fix1"> I'm another list item;what...
Remove inline style to an external file <!DOCTYPE html> <html> <head> <title>PROBLEM</title> </head> <body>    <form>...
Remove inline style to an external file <!DOCTYPE html> <html> <head> <title>PROBLEM</title> </head> <body>    <form> <table style="color:white;background-color:blue;border:solid black 7px;border-radius:25px;"> <tr><th colspan="2" style="color:white;background-color:black;border:solid black 2px;outline:solid black 2px;">SQUARE PROBLEM</th></tr> <tr> <td><label>Enter side:</label></td><td> <input type="text" style="background-color:#DEDEE6;border:4px solid red;"/> </td> </tr> <tr> <td><label>Area:</label></td><td> <input type="text" readonly style="background-color:#DEDEE6;border:4px solid yellow;"/> </td> </tr> <tr> <td><label>Perimeter:</label></td>   <td> <input type="text" readonly style="background-color:#DEDEE6;border:4px solid yellow;"/> </td> </tr> <tr>    <td colspan="2" >    <center>    <input type="button" value="Area" style="color:white;background-color:black;border:1px solid red;"/>    <input type="button" value="Perimeter" style="color:white;background-color:black;border:1px solid white;"/>...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT