Wednesday, 3 April 2019

Lab 4

<html>
<head>
<title>My First Webpage</title>
</head>
<body bgcolor="#EDDD9E">
<hl align="center">MY First Webpage</hl>
<p>Welcome to my <strong>first</strong> webpage. I am writing this page using a text editor and plain old html.</p>
<p>By learning html, I'll be able to create web pages like a pro....<br>which I am of course.</p>
Here's what I've learned:
<ul>
<li>How to use HTML tags</li>
<li>How to use HTML colours</li>
<li>How to create Lists</li>
</ul>
</body>
</html>

1. Explain about the HTML code above.
<html> Defines the root of an HTML document
<head> Defines information about the document
<title> Defines a title for the document
<body bgcolor="#EDDD9E"> 
Defines the document's body and the bgcolor                                                              attribute is used to set the background color of                                                            an HTML element
<h1 align="center">  Defines HTML headings where align="center" arranged                                             its position at the middle
<p>         Defines a paragraph
<br>
Defines a single line break
<ul>       Defines a block element used to designate an unordered list
<li>        Defines a list item in ordered or unordered lists

2. Change the given HTML code by using an ordered list tags.
<html>
<head>
<title>My First Webpage</title>
</head>
<body bgcolor="#EDDD9E">
<hl align="center">MY First Webpage</hl>
<p>Welcome to my <strong>first</strong> webpage. I am writing this page using a text editor and plain old html.</p>
<p>By learning html, I'll be able to create web pages like a pro....<br>which I am of course.</p>
Here's what I've learned:
<ol>
<li>How to use HTML tags</li>
<li>How to use HTML colours</li>
<li>How to create Lists</li>
</ol>
</body>
</html>

3. List 10 colours HEX value in HTML codes.

  • Aqua #00FFFF
  • Black #000000
  • Blue #0000FF
  • Fuchsia #FF00FF
  • Gray #808080
  • Green #008000
  • Lime #00FF00
  • Navy #000080
  • Silver #C0C0C0
  • Teal #008080

4. Provide a HTML code for definition lists.
<dl>
<dt>First</dt>
<dd>This is the first.</dd>
<dt>Second</dt>
<dd>This is the second.</dd>
</dl>

No comments:

Post a Comment