WPD 312004 Practical No 2: Use of heading tags in web page Answer

WPD 312004 Practical No 2: Use of heading tags in web page Answer

WPD 312004 Practical No 2: Use of heading tags in web page Answer
WPD 312004 Practical No 2: Use of heading tags in web page Answer

Practical Significance

The headings in HTML are utilized to designate the titles of a webpage, which are crucial for emphasizing the subjects. Heading tags offer valuable details and descriptors regarding the document’s layout. Search engines utilize headings to index the structure and arrange the webpage’s content.

Let’s perform exercises of WPD 312004 Practical No 2…

Exercises

1. Write HTML Code to set the background color and text color of the heading tag.

Answer: 
<!DOCTYPE html>
<html lang=”en”>
<head>
  <meta charset=”UTF-8″>
  <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
  <title>Colored Heading</title>
</head>
<body bgcolor=”#ffff00″>  <h1 style=”color:red;”>This is a heading</h1>  </body>
</html>
2. Create a web page to display string in center “Maharashtra Board of Technical Education, Mumbai” using all heading tags. (see the output.)

Answer: 

<!DOCTYPE html>
<html lang=”en”>
<head>
  <meta charset=”UTF-8″>
  <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
  <title>Maharashtra Board of Technical Education</title>
  <style>
    body {
      text-align: center;
    }
  </style>
</head>
<body>
  <h1>Maharashtra Board of Technical Education, Mumbai</h1>
  <h2>Maharashtra Board of Technical Education, Mumbai</h2>
  <h3>Maharashtra Board of Technical Education, Mumbai</h3>
  <h4>Maharashtra Board of Technical Education, Mumbai</h4>
  <h5>Maharashtra Board of Technical Education, Mumbai</h5>
  <h6>Maharashtra Board of Technical Education, Mumbai</h6>
</body>
</html>
Output Received :

WPD 312004




3. Create a web page for the following output:

WPD

Coding :


<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>MSBTE</title>
<style>
  body {
    font-family: times new roman, sans-serif;  /* Specify a font family */
  }
  .h1-center {
    text-align: center;  /* Center the h1 text */
    font-size: 16px;  /* Set font size for h1 */
  }
  .h2-right-red {
    text-align: right;  /* Align h2 text to the right */
    font-size: 25px;  /* Set font size for h2 */
    color: red;  /* Set font color for h2 to red */
  }
  .h3-orange-strip {
    background-color: darkorange;  /* Set background color for h3 */
    padding: 10px;  /* Add padding to h3 */
    font-size: 22px;  /* Set font size for h3 */
  }
</style>
</head>
<body>
  <h1 class=”h1-center”>MSBTE</h1>
  <h2 class=”h2-right-red”>MSBTE </h2>
  <h3 class=”h3-orange-strip”>Hello MSBTE</h3>
</body>
</html>
Output :
312004

Conclusion

We successfully completed the above practical by solving all HTML Exercises.

You may want to read this post :

Practical Related Questions

1. State the importance of heading in HTML.
Answer:
Utilizing headings is crucial for displaying the organization of a document. Main headings should be designated with <h1> tags, followed by subheadings using <h2>, and then less significant headings with <h3>, and so forth. Remember to use HTML headings exclusively for structuring content and avoid using them solely for formatting text to appear larger or in bold.
2. State the correct HTML tag to change the text color to green for <h4> tag.

Answer :

<h4 style=”color: green;”>This text will be green</h4>

So that’s it we solved this Web page development 312004 manual practical no 2 successfully.

Leave a Reply

Your email address will not be published. Required fields are marked *