Laboratory 1 – Week 1 An Introduction to Notepad++ and HTML 1.1 Introduction This is a short session to familiarize working with the Notepad++. You can use Notepad++ to create different webpages, from simple webpage to huge website for big enterprises. Notepad++ supports several languages. Running on the MS Windows environment. Here we are going to work with HTML. 1.2 Preliminaries Make sure you have access to a certain directory to save your projects in. 1.3 Starting and Ending Notepad++ You can find out which edition of Notepad++ is right for you and can download Notepad++ from Notepad++ editions. On the department machines, Notepad++ can be found through the following menus: Start Button-All Apps – Notepad++ This program works similar to any other software product, i.e. you open up the program, and you then either create a new page or load an existing page. When you have finished, you exit Notepad++ by selecting File-Exit. 1.4 Notepad++ Page 1 of 7 The components of the Notepad++ that we will be working with are as follows: a) Text editor window for writing and editing source code manually. b) Run menu for running the code on the browser. c) File menu for saving the webpage with extension filename.htm or filename.html How to create a simple webpage? a. Open Notepad ++ text editor and type the following: <!DOCTYPE html> <head> <meta charset="UTF-8"> <title>My First Webpage</title> </head> <body> <p>This is my first homepage. <b>This text is bold</b> </p> </body> <footer> <p> This is my footer. </p> </footer> </html> b. Save the file as mypage.html Output in web browser: Basic HTML Tags Basic HTML Tags <!DOCTYPE html> <html> <head> <footer> < body> <h1> to <h6> <p> <br> <!--> Tag Description Declaration defines this document to be HTML5. It is a root element of html page that defines an HTML document. Contains meta information about the document. Defines a footer for a document or a section. Defines the document's body that contains the visible page content. Defines header 1 to header 6. Defines a paragraph. Inserts a single line break. Defines a comment. The following elements can go inside the <head> element: <title> to give a name for the webpage. <style> to allow adding styles for the webpage. <base> to specify the base URL/target for all relative URLs in a document. <link> to define a link between a document and an external resource. <meta> to provide information about data. Page 2 of 7 Meta elements are typically used to specify page description, keywords, and author of the document, last modified, and other metadata. The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services. <script> to define a client-side script (JavaScript). <noscript> to display an alternate content for users that have disabled scripts in their browsers or have a browser that doesn't support script. Example on Headings: <h1>This is a heading One</h1> <h2>This is a heading Two</h2> <h3>This is a heading Three</h3> <h4>This is a heading Four</h4> <h5>This is a heading Five</h5> <h6> This is a heading Six</h6> Example on Paragraph, Bold and Italic: <p>This is how we make a word appear <b>bold</b>.</p> <p>This is how we make a word appear <i>italic</i>.</p> Example on SUPERSCRIPT & SUBSCRIPT: <p>On the 4<sup>th</sup> September you will learn about E=MC<sup>2</sup>.</p> <p>The amount of C0<sub>2</sub> in the atmosphere grew by 2ppm in 2009<sub>1</sub>.</p> Example on Line Breaks: The <br> tag is used when you want to start a new line, but don't want to start a new paragraph. The <br> tag forces a line break wherever you place it. It is similar to single spacing in a document. <p>This <br> is a para<br> graph with line breaks</p> Example on Horizontal Rule: The <hr> element is used for horizontal rules that act as dividers between sections. Page 3 of 7 Example on STRONG & EMPHASIS: <p><strong>Beware</strong> pickpockets operate in this area.</p> <p>I <em>think</em> Ivy was the first.</p> <p>I think <em>Ivy</em> was the first.</p> <p>I think Ivy was the <em>first</em>.</p> Example on Quotations: <blockquote cite="http://en.wikipedia.org/wiki/ Winnie-the-Pooh"> <p>Did you ever stop to think, and forget to start again?</p> </blockquote> <p>As A.A. Milne said, <q>Some people talk to animals. Not many listen though. That's the problem.</q></p> Example on Abbreviations & Acronyms: <p><abbr title="Professor">Prof</abbr> Stephen Hawking is a theoretical physicist and cosmologist.</p> <p><acronym title="National Aeronautics and Space Administration">NASA</acronym> do some crazy space stuff.</p> Example on Citations & Definitions: <p><cite>A Brief History of Time</cite> by Stephen Hawking has sold over ten million copies worldwide.</p> <p>A <dfn>black hole</dfn> is a region of space from which nothing, not even light, can escape.</p> Example on Author Details: <address> <p><a href="[email protected]"> [email protected]</a></p> <p>742 Evergreen Terrace, Springfield</p> </address> Example on Changes to Content: <p>It was the <del>worst</del> <ins>best</ins> idea she had ever had. </p> <p>Laptop computer:</p> <p><s>Was $995</s></p> <p>Now only $375</p> Example on Comments: <p> This html comment would <!-- This is a comment --> be displayed like this.</p> Page 4 of 7 General Exercise: Design webpage that outputs the following: Page 5 of 7 Text editor <!DocTYPE html> <head> <meta charset="UTf-8"> <title> My Page Lab1 </title> </head> <body> <!-- Page Title horizontal ruler and break line tag--> <p> <b>This is my first homepage </b> </p> <br/> <hr/> <!-- using Superscript tag--> <p> Today is Monday 17<sup>th</sup> of October 2016. </p> <!-- using Cite, heading, bold and italic tags--> <p> <cite> <h3>A Brief History of Time </h3></cite> by <b>Stephen Hawking</b> has sold over <i>ten million </i> copies worldwide. </p> <!-- using Subscript tag--> <p> Water is H<sub>2</sup>O. </p> <!-- using blockqoute tag --> <blockquote cite="http://en.wikipedia.org/wiki/Winnie-the-Pooh"> <p>Did you ever stop to think, and forget to start again?</p> </blockquote> <!-- using double qoutes tag --> <p> As Salma said, <q>you always can, so never give up</q> </p> <!-- using abberviation tag --> <p> <abbr title="Professor">Prof</abbr> Stephen Hawking is a theoretical physicist and cosmologist. </p> <!-- using acronym tag for clarifing abberviations --> <p> <acronym title="National Aeronautics and Space Administration"> NASA </acronym> do some crazy space stuff. </p> <!-- using definition tag--> <p> A <dfn>black hole</dfn> is a region of space from which nothing, not even light, can escape. Page 6 of 7 </p> <!-- using address tag with hyperlink to email--> <address> <p> <a href="[email protected]"> [email protected] </a></p> <p>742 Evergreen Terrace, Springfield</p> </address <p>It was the <del>worst</del> <!-- using delete, underline, & strike tags--> <p>It was the <del>worst</del> <ins>best</ins> idea she had ever had. </p> <p>Laptop computer: <s>Was $995</s> Now only $375</p> </body> <!-- Footer tag with emphasis tags and strong tag--> <footer> <p> <em>This is my <strong>footer</strong>.</em> </p> </footer> </html> 1.5 Exercises Design webpages that outputs the following: a. Paragraph with 4 - 5 sentences. Each sentence should be a different font and color. b. Paragraph that is a description of a book, include the title of the book as well as its author. Names and titles should be underlined, adjectives should be italicized and bolded. c. Ten acronyms and abbreviations of your choosing, each separated by two lines and horizontal ruler. Specify the data that the abbreviations and acronyms represent. Page 7 of 7
© Copyright 2026 Paperzz