2079 1

BIT251 ยท 2079 ยท 10 marks

What is the meaning of hypertext and markup in HTML. Create a HTML page having title "Myfirstpage" and a Meta tag with name author having content "Gunnu". The page should have a body part having a div with id DV_1 which should contain an ordered list of fruit items namely Orange, Apple2, Banana3 and

What is the meaning of hypertext and markup in HTML. Create a HTML page having title "Myfirstpage" and a Meta tag with name author having content "Gunnu". The page should have a body part having a div with id DV_1 which should contain an ordered list of fruit items namely Orange, Apple2, Banana3 and Kiwi. The item kiwi should also have link to www.kiwi.com. Insert a comment "This is kiwi" after the item Kiwi. Also display an alert message "Helloworldx" in onload() event of the body.[10]

Web Technology IChapter 1: Web Fundamentals and ArchitectureHypertext and markup concepts

Quick answer

When the page loads: 1. An alert box appears with the message: Helloworldx 2. After dismissing the alert, the page displays a numbered list.

HTML: Hypertext, Markup, and Complete Page Creation

Part 1: Meaning of Hypertext and Markup in HTML

Hypertext

Hypertext refers to text that contains links (hyperlinks) to other documents or resources. Unlike plain linear text, hypertext allows users to navigate non-linearly by clicking on links that connect one page or resource to another. The "hyper" prefix means "beyond" or "above" ordinary text, indicating that the text goes beyond simple reading and enables interconnected navigation across the web.

Example: Clicking a link on one webpage that takes you to another webpage is the concept of hypertext in action.

Markup

Markup refers to the use of tags and annotations embedded within the content to define the structure, formatting, and meaning of the text. In HTML, markup is done using angle-bracket tags such as <p>, <h1>, <div>, etc. These tags "mark up" the plain content to tell the browser how to display or interpret it.

Example: <b>Hello</b> marks the word "Hello" to be displayed in bold.

Together: HTML = HyperText Markup Language

HTML combines both concepts: it uses markup tags to structure content, and supports hypertext links to connect documents across the internet.


Part 2: Complete HTML Page

<!DOCTYPE html>
<html>

  <head>
    <title>Myfirstpage</title>
    <meta name="author" content="Gunnu">
  </head>

  <body onload="alert('Helloworldx')">

    <div id="DV_1">

      <ol>
        <li>Orange</li>
        <li>Apple2</li>
        <li>Banana3</li>
        <li>
          <a href="http://www.kiwi.com">Kiwi</a>
        </li>
        <!-- This is kiwi -->
      </ol>

    </div>

  </body>

</html>

Explanation of Each Part

ElementPurpose
<!DOCTYPE html>Declares the document as HTML5
<title>Myfirstpage</title>Sets the browser tab/title to "Myfirstpage"
<meta name="author" content="Gunnu">Meta tag specifying the author as "Gunnu"
<body onload="alert('Helloworldx')">Fires a JavaScript alert with "Helloworldx" when the page loads
<div id="DV_1">A division/container with id attribute set to DV_1
<ol>Creates an ordered list (numbered list) of fruit items
<li>Orange</li>, <li>Apple2</li>, <li>Banana3</li>Individual list items for the first three fruits
<a href="http://www.kiwi.com">Kiwi</a>Kiwi list item with a hyperlink pointing to www.kiwi.com
<!-- This is kiwi -->An HTML comment inserted after the Kiwi item (not visible in browser)

Expected Output in Browser

When the page loads:

  1. An alert box appears with the message: Helloworldx
  2. After dismissing the alert, the page displays a numbered list:
    1. Orange
    2. Apple2
    3. Banana3
    4. Kiwi   <-- clickable link to www.kiwi.com
    

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.