Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 1

Similar documents
Attributes & Images 1 Create a new webpage

Unit 2 - HTML Formatting

INTRODUCTION TO WEB USING HTML What is HTML?

Programmazione Web a.a. 2017/2018 HTML5

What is XHTML? XHTML is the language used to create and organize a web page:

Unit 5 Web Publishing Systems Page 1 of 13 Part 4 HTML Part 4

Introduction to Web Development

HTML. Mohammed Alhessi M.Sc. Geomatics Engineering. Internet GIS Technologies كلية اآلداب - قسم الجغرافيا نظم المعلومات الجغرافية

11. HTML5 and Future Web Application

Introduction to Computer Science (I1100) Internet. Chapter 7

Objective % Select and utilize tools to design and develop websites.

COMSC-030 Web Site Development- Part 1. Part-Time Instructor: Joenil Mistal

RAGE WebDesign Quick Start 1 of 18. Welcome To RAGE WebDesign

Understanding structure Learning about markup Tags and elements. Structure COPYRIGHTED MATERIAL

HTML&CSS. design and build websites

It is possible to create webpages without knowing anything about the HTML source behind the page.

Adding Audio and Video Content to Web pages. Audio Content - Add some Audio content to your page. Audio & Video 1

Training Sister Hicks

Creating A Web Page. Computer Concepts I and II. Sue Norris

CSS BASICS. selector { property: value; }

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

UNIT 3 SECTION 1 Answer the following questions Q.1: What is an editor? editor editor Q.2: What do you understand by a web browser?

Beginning HTML. The Nuts and Bolts of building Web pages.

Site Owners: Cascade Basics. May 2017

FrontPage Help Center. Topic: FrontPage Basics

Beginning Web Site Design

Creating Web Pages with SeaMonkey Composer

CSCU9B2 Practical 1: Introduction to HTML 5

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

More about HTML. Digging in a little deeper

Hyper Text Markup Language

This document provides a concise, introductory lesson in HTML formatting.

CAS 111D: XHTML Tutorial

HTML/CSS Lesson Plans

Revision for Grade 7 ASP in Unit :1&2 Design & Technology Subject

Creating and Building Websites

Microsoft Expression Web Quickstart Guide

Figure 1 Properties panel, HTML mode

Hyper Text Markup Language

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab.

The Domino Designer QuickStart Tutorial

Introduction to Computer Science (I1100) Internet. Chapter 7

Lesson 1 HTML Basics. The Creative Computer Lab. creativecomputerlab.com

AOS 452 Lab 4: HTML, CSS and Your Webpage

CMT111-01/M1: HTML & Dreamweaver. Creating an HTML Document

Using WebBoard at UIS

1. The basic building block of an HTML document is called a(n) a. tag. b. element. c. attribute. d. container. Answer: b Page 5

Netscape Composer Tutorial

AOS Lab 4 HTML, CSS and Your Webpage

Web Design 101. What is HTML? HTML Tags. Web Browsers. <!DOCTYPE html> <html> <body> <h1>my First Heading</h1> <p>my first paragraph.

HTML. Hypertext Markup Language. Code used to create web pages

LECTURE 08: INTRODUCTION TO HTML

USING DRUPAL. Hampshire College Website Editors Guide

Introduction to HTML

BEGINNER PHP Table of Contents

Getting Started with Word

An attribute used in HTML that is used for web browsers screen reading devices to indicate the presence and description of an image Module 4

WEBSITE DEVELOPMENT CODERDOJO ATHENRY 2014

INTRODUCTION TO HTML5! HTML5 Page Structure!

Dreamweaver Basics Outline

Dreamweaver Basics. Planning your website Organize site structure Plan site design & navigation Gather your assets

Tutorial 2 - HTML basics

HTML 5 Form Processing

Web Development & Design Foundations with XHTML. Chapter 2 Key Concepts

Dreamweaver Basics Workshop

c122jan2714.notebook January 27, 2014

Using Dreamweaver CS6

Web Design and Application Development

Using Dreamweaver. 1 Overview. About the Web. About Dreamweaver

Basics of Web Design, 3 rd Edition Instructor Materials Chapter 2 Test Bank

Basic Internet Skills

CMPT 165 Unit 2 Markup Part 2

FCKEditor v1.0 Basic Formatting Create Links Insert Tables

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

Revision for Grade 9 in Unit #1&2

Animation and style sheets

ADOBE Dreamweaver CS3 Basics

HTML+ CSS PRINCIPLES. Getting started with web design the right way

CS 1100: Web Development: Client Side Coding / Fall 2016 Lab 2: More HTML and CSS

By Ryan Stevenson. Guidebook #2 HTML

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

Basic CSS Tips and Tricks

Imagery International website manual

Hyper Text Markup Language HTML: A Tutorial

Web Publishing Basics I

Master Syndication Gateway V2. User's Manual. Copyright Bontrager Connection LLC

BASICS OF WEB DESIGN CHAPTER 2 HTML BASICS KEY CONCEPTS

6.170 Laboratory in Software Engineering Java Style Guide. Overview. Descriptive names. Consistent indentation and spacing. Page 1 of 5.

Web Programming and Design. MPT Senior Cycle Tutor: Tamara Week 1

[Type text] Quick Start Guide Version 3

Review of HTML. Chapter Pearson. Fundamentals of Web Development. Randy Connolly and Ricardo Hoar

Create web pages in HTML with a text editor, following the rules of XHTML syntax and using appropriate HTML tags Create a web page that includes

Arduino IDE Friday, 26 October 2018

Tips & Tricks Making Accessible MS Word Documents

Microsoft Office Word 2010

Dreamweaver CS6. Table of Contents. Setting up a site in Dreamweaver! 2. Templates! 3. Using a Template! 3. Save the template! 4. Views!

CREATING WEBSITES. What you need to build a website Part One The Basics. Chas Large. Welcome one and all

A Guide to Quark Author Web Edition 2015

CSC 121 Computers and Scientific Thinking

Working with Pages... 9 Edit a Page... 9 Add a Page... 9 Delete a Page Approve a Page... 10

Transcription:

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 1 Introduction to HTML HTML, which stands for Hypertext Markup Language, is the standard markup language used to create web pages. HTML consists of HTML elements, which define the different parts of the document. The web developer uses HTML tags to specify which elements go on a given page. For example, you can use HTML tags to specify headings, paragraphs, lists, tables, images and much more. What do I need to create HTML? You don't need any special equipment or software to create HTML. In fact, you probably already have everything you need. Here is what you need: Computer This is probably an obvious one. Tablets should be fine too, and maybe even your smartphone. HTML Editor An HTML editor is an application that helps you create HTML pages. While you can certainly create HTML documents using a simple text editor, an HTML editor will make your life easier especially if you plan to write a lot of code. HTML editors usually highlight your code so that it's easier to read, and they will typically have an autocomplete feature that picks up on what you're typing, and makes valid HTML suggestions, like Notepad++ (pictured).

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 2 Or a Text Editor If you don't have an HTML editor, and you don't want to download one just now, a text editor is fine. Most computers already have a text editor. Examples of text editors include Notepad. Web Browser To view the results of your HTML code. OK, technically, you can create HTML without viewing the results, but where's the fun in that! Do I need to be online? No, you do not need to be online to create web pages. You can create web pages on your local machine. You only need to go online when you want to publish your web page to the web. The next lesson will show you how to create a web page in less than 5 minutes. About HTML HTML stands for Hypertext Markup Language, and it's the standard markup language used to create web pages. Tool Tip This module will present you with a number of new terms and techniques which you may not be able to remember when you need them. Luckily, there is assistance in the form of a constant search box. All you need to do is press the ctrl and F keys at the same time and a find search tool opens simply type your search term in the box and the program will take you to the next time that term is used in the document. This tool works on most text based documents (Word, pdf, internet applications, and Notepad too!).

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 3 There are a number of video Tutorials in the Shared drive to assist in preparing and beginning the HTML module. They are located here: S:\+Shared Data Files\BBT 9\HTML 5\Video Tutorials HTML Tips 1. Folder Options A. Before you begin HTML ensure that your folder options are set so that the preview pane is not selected. To check go to your folder button from your task bar, then select the view tab and turn it off. This is important because it can interfere with your ability to save files. Folder Button B. While in the view tab select the file name extensions check box. This will show the extensions in your folders. This is helpful when coding so you can see the whole file name. Ensure the Preview Pane is not selected File name extension checkbox Watch the video on this in the S drive: S:\+Shared Data Files\BBT 9\HTML 5\Video Tutorials\Setting up your folders Or view it here: https://youtu.be/ntqtgbdbck4

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 4 2. Setting up Notepad++ A. Go to your windows start button locate Notepad++, open it and pin it to your task bar. B. Open Notepad++ and ignore updates. Then select the settings tab and select preferences C. In the Preferences window select New Document, then change the language to HTML. Watch the video on this in the S drive: S:\+Shared Data Files\BBT 9\HTML 5\Video Tutorials\Setting up Notepad++ or view it here: https://youtu.be/1yga8_tqiby

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 5 3. Setting up your HTML folder 1. If you have not yet created an HTML folder do so now. Create it inside your BBT9 folder in your U drive. 2. Inside your HTML folder create another folder named Practice. 3. Open Notepad++ and create a new file and name it Index and save it in your new Practice folder. (Open the folder and ensure it is named Index.html). File structure in HTML When coding in HTML it is important that you keep all your files in a neat and organized manner and that all files used in the website are located in the same folder. Html pages cannot look outside their main folder for content to display on the page. For example: The source HTML document (Index.html) needs to be inside the main folder Main Folder (Practice). Likewise any images, media and backgrounds need to be either in the main Practice folder, or a folder inside the main Practice folder. If you want to use an image or other content from some other folder it needs to be copied into one of the folders in the main Practice folder Your Source page (Index.html) cannot look outside the main folder (Practice). Source Document Index Watch the video on this in the S drive: S:\+Shared Data Files\BBT 9\HTML 5\Video Tutorials\Setting up your Folders

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 6 Unit 1 - Lesson 1 - Create your First Web Page! Let's create a webpage using HTML, then view it in a web browser. First let s create a folder named HTML. Then create a folder inside this folder named Practice. All the files you need to create your webpage need to be in the same folder so this webpage files will all be inside your Practice folder. OK, lets get straight into it. Here, you will learn just how easy it is to create a web page. In fact, by the time you've finished with this Module, you will have created your own web page! When you create a web page you will usually do something like this: 1. Create an HTML file 2. Type some HTML code 3. View the result in your browser 4. Repeat the last 2 steps (if necessary) Create a Webpage OK, let's walk through the above steps in more detail. 1. Create an HTML file An HTML file is simply a text file saved with an.html extension (i.e. as opposed to a.txt extension). 1. Open up your HTML editor (Notepad++). You could use your computer's normal plain text editor if you prefer. 2. Create a new file (if one wasn't already created) 3. In your BBT folder of your U drive, create a new folder named 1Index and Save the file inside the folder named practice.

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 7 2. Type some HTML code Type the following code into your Notepad++ file named 1Index: (Pay attention to upper and lower case type) 1 2 3 4, 5 6 7 8 9 <!DOCTYPE html> <html> <head> <title>my HTML Practice Page</title> </head> <body> <h1>my First Website</h1> <p>less than 5 minutes into this HTML tutorial and I've already created my first homepage!</p> </body> </html> These are the 9 basic tags required to create a webpage in HTML 5. (Hint these 9 are required to create a second and third page you will need to remember this later Please note that the h1 tag uses the number 1, not the letter L Watch the video on this in the S drive: S:\+Shared Data Files\BBT 9\HTML 5\Video Tutorials\Creating your first webpage Or view it here: https://youtu.be/nr0ohz0syty 3. View the result in your browser If you are using Notepad++ you can select the Run command from the main window and select the launch in Chrome option

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 8 Or you can navigate to your file in your U drive (Index.html) then double click on the html file. 4. Repeat the last 2 steps until you're satisfied with the result It's unrealistic to expect that you will always get it right the first time around. Don't worry that's OK! Just try again and again until you get it right. Part of the fun of creating web pages is experimenting with different elements, styles, approaches, etc, and then checking out the result. Explanation of code OK, before we get too carried away, I'll explain what that code was all about. We just coded a bunch of HTML tags. These tags tell the browser what to display and where. You may have noticed that for every "opening" tag there was also a "closing" tag, and that the content we wanted to display appeared in between. Most HTML tags have an opening and closing tag. The next lesson goes into a bit more detail about HTML tags. Lesson 2 - HTML Elements HTML elements are the fundamentals of HTML. HTML documents are simply a text file made up of HTML elements. These elements are defined using HTML tags. An HTML element usually consists of a start tag and end tag, with the content inserted in between: <tagname>content goes here...</tagname> The HTML element is everything from the start tag to the end tag: <p>my first paragraph.</p>

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 9 An HTML element is an individual component of an HTML document. Any given web page consists of many HTML elements. HTML tags tell your browser which elements to present and how to present them. Where the element appears is determined by the order in which the tags appear. HTML consists of over 100 tags. Don't let that put you off though - you will probably find that most of the time, you only use a handful of tags on your web pages. (You can find a list of tags and how to use them here: https://www.quackit.com/html/tags/) OK, lets look more closely at the example that we created in the previous lesson. <!DOCTYPE html> <html> <head> <title>my HTML Practice Page</title> </head> <body> <h1>my First Website</h1> <p>less than 5 minutes into this HTML tutorial and I've already created my first homepage!</p> </body> </html> Show your teacher your first web page and have them initial your Activity Sheet (#4)! Explanation of the above code: The!DOCTYPE... declaration tells the browser which version of HTML the document is using. The html element is the document's root element - it can be thought of as a container that all other tags sit inside (except for the!doctype declaration). Please note that the circled characters are the Number 1, Not the letter L. They create the Level 1 heading.

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 10 The head tag contains information that is not normally viewable within your browser (such as meta tags, JavaScript and CSS), although the title tag is an exception to this. The content of the title tag is displayed in the browser's title bar (right at the very top of the browser). The body tag is the main area for your content. This is where most of your code (and viewable elements) will go. The h1 tag defines a level 1 heading. Please note that the heading tag uses numbers (1-6). The p tag defines a paragraph. This contains the body text. Did you notice how the<title> element is inside the <Head> element and the <p> element is inside the <body> element? That is called nesting elements and it is a very essential part of the HTML structure. I will leave it at this for now, but I just wanted to introduce to you the idea of nesting elements. (See: http://www.html5-tutorials.org/introduction-to-html/yourfirst-webpage/ And: https://www.w3schools.com/html/html_elements.asp) Closing your Tags As mentioned in a previous lesson, you'll notice that all of these HTML elements have opening and closing tags, and that the content of the element is placed in between them. There are a few exceptions to this rule. You'll also notice that the closing tag is slightly different to the opening tag the closing tag contains a forward slash (/) after the <. This tells the browser that this tag closes the previous one. Indents and Carriage Returns You can indent the code and add extra carriage returns if you like. This can help with readability, and it doesn't affect the way the page is displayed in the browser.

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 11 In fact, code indenting is a universal practice in computer programming circles, and most HTML editors automatically indent the code for you as you type. (NB: using Notepad++ go to the settings menu, select preferences, and in New Document, select the default language as HTML). For example, we could take the above example, and indent it like the following example, and it will still appear the same in the browser. <!DOCTYPE html> <html> <head> <title>my HTML Practice Page</title> </head> <body> <h1>my First Website</h1> <p>less than 5 minutes into this HTML tutorial and I've already created my first homepage!</p> </body> </html> UPPERCASE or lowercase? You can use uppercase or lowercase when coding HTML, however, HTML 5 requires all lowercase and most developers use lowercase. This helps the readability of your code, and it also saves you from constantly switching between upper and lower case. Therefore... Good: <head> OK: <HEAD> Hyperlinks Links (hyperlinks) should be easy to find (be consistently placed) on your Web page and should always let users know where the link will take them.

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 12 Type the following code above your closing body tag (</body>) in your HTML editor. <a href="http://leohayeshigh.nbed.nb.ca">go to Leo Hayes Webpage</a><br> Save and refresh and you can now visit the Leo Hayes website by clicking on the go to Leo Hayes Website link in your browser. Explanation of code: The <a> tag defines a hyperlink, which is used to link from one page to another. The most important attribute of the <a> element is the href attribute, which indicates the link's destination. The opening tag provides the link telling the browser that a link to another page is enclosed. <A href = https > The quotation marks are required. The display text is the text that goes between the opening and closing tags. This is the text that will display on the browser and become the link. without this text there is no working link to click on. In this case the display text is: Go to Leo Hayes Website The closing tag is required to let the browser know that the link is finished. </a> Adding pages and Hyperlinks (taking it from a webpage to a website): First, you need to create a third page for your website and this file needs to be in the same folder (Practice) as the first page (1Index.html). To make another page simply select new in your notepad++ Then type in the 9 tags required for all webpages and save it as 2Elements.html. <!DOCTYPE html> <html> <head>

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 13 <title>welcome to the Elements Page</title> </head> <body> </body> </html> Second, In the bottom of your Index page (Index.html), but before your closing body tag (</body>) enter the following code (shown in bold). <a href="2elements.html"> Go to second page </a><br> </body> You will also need to put a link on your second page to bring you back to your first. Open 2Elements.html notepad and enter the following (shown in bold): <body> <a href="1index.html" >Back to Home Page </a> <br> </body> Save and Refresh. You should now have a link that reads Back to Home Page. Try your link. You should now have links to and from both of your Web pages. Hey, you have a Web site! Special note about Hyperlinks absolute and relative links Links, otherwise known as hyperlinks, are defined using the <a> tag otherwise known as the anchor element. To create a hyperlink, you use the <a> tag in conjunction with the href attribute. The value of the href attribute is the URL, or, location of where the link is pointing to. Hypertext references can use absolute URLS or relative URLs.

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 14 absolute This refers to a URL where the full path is provided. For example: <a href="https://www.quackit.com/html/tutorial/">html Tutorial</a> You can also use absolute references on your own pages (do not do this): <a href= U:\ BBT 9\HTML\Index.html >Home Page</a> relative This refers to a URL where the path, relative to the current location, is provided. For example, if we want to reference the Index page of our Practice website and we are referencing inside our Practice folder we simply need use this: <a href="index.html">my Home Page</a> **NB: all the references you will use to link to your own pages are relative links. If you copy and paste links from your address bar to do this ensure that you are not providing an absolute reference if you do your teacher will not be able to link to your pages because you are not posting your website to the internet and therefore an absolute reference will not work for anyone else (outside of your computer). What you have learned so far: Always declare the doctype - <!DOCTYPE html> Elements require opening and closing tags Use the element <html> to identify the start and end of your HTML programming Use the element <head> to separate the information about your page (and titles) Use your <title> element to display your webpage name on the title bar

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 15 Use the element <body> to display all the content of your webpage Indenting your markup makes it easier to comprehend You can nest one element inside another element <a > elements are used for hyperlinks Quotation marks are required in hyperlinks Display text is required in hyperlinks All webpages of a website must be saved in the same folder *Unit 1 Activity Sheet response: Show your teacher your HTML editor, with both pages open: 1Index and 2Elements. Also have your browser open displaying both pages and have your teacher initial your activity sheet at #3. Activity 1 Review Questions Answer in your Activity Sheet question # 4 Now it s time to review what you ve learned in this activity. Enter the letter of the correct answer on your Activity Sheet. 1. What does HTML stand for? A. Hot Mail B. Hypertext Mark-up Language C. Hypertext Made-up Language D. Hypertext Mail Language 2. What is another name for HTML tags? A. Hypertexts B. Browsers C. Elements D. Links 3. The opening and closing tags for the title of a web page, in order, are: A. <title> and </title> B. </title> and <title> C. title and /title D. <title> and </head>

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 16 4. In the correct order the nine tags that are the basics for an HTML Web page are: A. <doctype html> <head> </head> <title> </title> <body> </body> </html> </doctype> B. <html> <!doctype > <body> <head> <title> </title> </head> </body> </html> C. <!doctype html> <html> <head> <title> </title></head> </html> <body> </body> </!doctype html> D. <!DOCTYPE html> <html> <head> <title> </title> </head> <body> </body> </html> 5. What is a file extension? A. A period and letters added to the end of a file name to identify the type of file it is. B. The name of a folder. C. The name of a text editor program. D. An addition to the name of a file so that it is different from another file of the same name. Next Lesson: HTML Elements