0% found this document useful (0 votes)
55 views

LWD Assignment 1

The document describes the basic structure of an HTML document and some common HTML elements and tags. It provides examples of HTML code for a welcome page, adding emphasis to text, setting image size, creating links, and more. It also defines some key HTML concepts like DOCTYPE, tags like <head> and <body>, and attributes like href, src, and alt.

Uploaded by

Tendai Chigondo
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views

LWD Assignment 1

The document describes the basic structure of an HTML document and some common HTML elements and tags. It provides examples of HTML code for a welcome page, adding emphasis to text, setting image size, creating links, and more. It also defines some key HTML concepts like DOCTYPE, tags like <head> and <body>, and attributes like href, src, and alt.

Uploaded by

Tendai Chigondo
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

TENDAI I CHIGONDO ND3 PART TIME

1. Describe the html structure giving an example of a welcome web page

 <!DOCTYPE> - this is the element which lets the browser know which version of
html is being used by a website.
 <html> - this is the root element of the page and everything is contained within it.
 <head> - the head element contains the non-visible elements of the website like
metadata.
 <title> - this element is responsible for the text displayed on the browser tab when the
tab is open
 <body> - the body element is the one that contains all the content that is visible to the
user for example the heading
 <h1> - this is a header element and there is six of them all varying in sizes h1 being
the largest

<!DOCTYPE html>
<html>
<head>
<title>Welcome</title>
</head>
<body>
<h1>Welcome to our website</h1>
</body>
</html>

2. What is the purpose of <!DOCTYPE>

!Doctype(document type) is a declaration which serves the purpose of informing the


browser the version of html that was used to code the website, this ensure the browser
uses the current rules to displaying the web elements within the website
TENDAI I CHIGONDO ND3 PART TIME

3. develop an html web page with nested html elements

<html>
<head>
<title>Nested Elements</title>
</head>
<body>
<p>this is part is <em> emphasized </em> </p>
</body>
</html>

4. Explain the following attributes of html:

a. Href – the href attribute specifies the URL of the page a link goes to i.e. an
external source.
Eg - <a href=”sololearn.com”>learn coding</a>

b. Src – the source attribute specifies the location of an external resource for
example a video, picture or audio
Eg - <video> <source src=”elephant.mp4” type=”video/mp4”> </video>

c. Alt – the alt attribute provides alternative information for an image if for some
reason a user can not view it.
Eg - <img src=”img/flower.png” alt=”flower”/>

d. Style – the style attribute specifies an inline style for an element


Eg - <h2 style=”color:red”>red text</h1>

e. Lang – the lang attribute specifies the language of the element’s content for
example “en” for English
Eg - <html lang=”en”
TENDAI I CHIGONDO ND3 PART TIME

5. Add a "tooltip" to the paragraph below with the text "About W3Schools".

<p title="About W3Schools">W3Schools is a web developer's site. </p>

6. Set the size of the image to 250 pixels wide and 400 pixels tall.

<img src="w3schools.jpg" width="250px" height="400px">

7. Make the element below into a link that goes to "https://www.w3schools.com".

<a href="https://www.w3schools.com">This is a link</a>

8. Who is making the Web standards?

Web standards are made by World Wide Consortium (W3C), they are developed to
promote consistency in the design code, this comes with many advantages for
example search engines will be able to access and index pages designed to web
standards with great efficiency.

Example of a web standard:


 HTML – stands for Hyper Text Mark-up language. HTML is the language that
has historically been used to create documents on the web. It is plain text, but
includes a variety of tags that define the structure of the document, and allow
documents to include headings, paragraphs, images, links, lists, tables and
other features.
 CSS – cascading style sheets, this language is a mechanism for changing the
appearance of html or xml elements by assigning styles to element types.
TENDAI I CHIGONDO ND3 PART TIME

9. Choose the correct HTML element for the largest heading:

The largest header in html is the <h1></h1> tag


<html>
<head></head>
<body>
<h1> largest header</h1>
</body>

</html>

10. What is the correct HTML for creating a hyperlink?

<a href="http://www.w3schools.com">W3Schools</a>

You might also like