Wednesday, April 3, 2019

LAB 4 : HTML COLORS & LISTS

My First Webpage>

My First Webpage

Welcome to my first webpage. I am writing this page using a text editor and plain old html.
By learning html, I'll be able to create web pages like a pro....
which I am of course.
Here's what I've learned:
  • How to use HTML tags
  • How to use HTML colours
  • How to create lists

LAB 4 : QUESTIONS WITH ANSWERS


HTML CODE

<html>
<head>
<title>My First Webpage</title>
</head>
<body bgcolor="#EDDD9E">
<h1 align="center">My First Webpage</h1>
<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>



HTML CODE (NOTEPAD)


 

OUTPUT





















1. Explain about the HTML code above
The HTML code is about the language working on displaying html file on a browser. The html file contains important parts such as head, title and body. Function of HTML tags :-
  • <html> - describes that this webpage is written in HTML.
  • <head> - Contains the information about the web.
  • <title> - Contains the webpage title.
  • <strong> - Text that has strong importance and it displays in bold..
  •  <body> - Contains the visible elements of the webpage.
  • <h1> - defines HTML headings where here the title is alligned to the center.
  • <p> - This element is used to identify blocks of paragraph text with a statement 'Welcome to my first webpage. I am writing this page using a text editor and plain old html'. The closing tag is optional and is implied by the opening tag of the next HTML element encountered in an HTML document after an opening tag.
  • <ul> - defines an unordered list.
  • <br> - This tag is to insert a single line break and later proceeding with 'which I am of course'.

2. Change the given HTML code by using an ordered list tags.
    HTML CODE
     <html>
    <head>
    <title>My First Webpage</title>
    </head>
    <body bgcolor="#EDDD9E">
    <h1 align="center">My First Webpage</h1>
    <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>

      HTML CODE (NOTEPAD)


 


          OUTPUT

         
        
3. List 10 colours HEX value in HTML codes.

  •  #00000FF - Blue
  •  #808000 - Olive
  •  #800080 - Purple
  •  #C0C0C0 - Silver
  •  #00FF00 - Lime
  •  #FFFFFF - White
  •  #000080 - Navy
  •  #800000 - Maroon
  •  #FF0000 - Red
  •  #EE82EE - Violet


4. Provide a HTML code for definition lists.

HTML CODE 
 
<html>
<head>
<title>My First Webpage</title>
</head>
<body bgcolor="#EDDD9E">
<h1 align="center">My First Webpage</h1>
<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>

<dl>
    <dt>Milk</dt>
    <dd>*White cold drink</dd>
    <dt>Coffee</dt>
    <dd>*Black hot drink</dd>
</dl>
</body>
</html>


HTML CODE (NOTEPAD)


      OUTPUT

No comments:

Post a Comment