LWD Assignment 1
LWD Assignment 1
<!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>
<html>
<head>
<title>Nested Elements</title>
</head>
<body>
<p>this is part is <em> emphasized </em> </p>
</body>
</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”/>
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".
6. Set the size of the image to 250 pixels wide and 400 pixels tall.
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.
</html>
<a href="http://www.w3schools.com">W3Schools</a>