Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture : Kholoud Eid University Majmaah. »Getting Started.. »What is HTML? »What can I use HTML for? »what does H-T-M-L stand for? »The HTML Basic Elements.

Similar presentations


Presentation on theme: "Lecture : Kholoud Eid University Majmaah. »Getting Started.. »What is HTML? »What can I use HTML for? »what does H-T-M-L stand for? »The HTML Basic Elements."— Presentation transcript:

1 Lecture : Kholoud Eid University Majmaah

2 »Getting Started.. »What is HTML? »What can I use HTML for? »what does H-T-M-L stand for? »The HTML Basic Elements & tags »How to create and View an HTML document? »Basic HTML Document Format 2 Lecture : Kholoud Eid

3 In this first lesson, you will get a brief presentation of the tools you need to make a website. What is needed? Most likely you already have everything you need. You have a "browser". A browser is the program that makes it possible to browse and open websites. Right now you are looking at this page in your browser. It is not important which browser you use. The most common is Microsoft Internet Explorer. But there are others such as Opera and Mozilla Firefox and they can all be used. You might have heard about, or even used, programs such as Microsoft FrontPage, Macromedia Dreamweaver or even Microsoft Word, which can - or claim that they can - create websites for you. Forget these programs for now! They are not of any help to you when learning how to code your own website. Instead, you need a simple text editor. If you are using Windows you can use Notepad, which is usually found in the start menu under Programs in Accessories: 3 Lecture : Kholoud Eid

4 4

5 If you are not using Windows, you can use a similar simple text editor. For example, Pico (Linux) or TextEdit (Mac). Notepad is a very basic text editing program which is excellent for coding because it does not interfere with what you are typing. It gives you complete control. The problem with many of the programs that claim they can create websites is that they have a lot of standard functions, which you can choose from. The downside is that, everything needs to fit into these standard functions. Thus, this type of programs often cannot create a website exactly as you want it. Or - even more annoyingly - they make changes to your hand- written code. With Notepad or other simple text editors, you only have yourself to thank for your successes and errors. A browser and Notepad (or a similar simple text editor) are all you need to go through this tutorial and make your own websites. 5 Lecture : Kholoud Eid

6 HTML is the "mother tongue" of your browser. To make a long story short, HTML was invented in 1990 by a scientist called Tim Berners-Lee. The purpose was to make it easier for scientists at different universities to gain access to each other's research documents. The project became a bigger success than Tim Berners-Lee had ever imagined. By inventing HTML he laid the foundation for the web as we know it today. HTML is a language, which makes it possible to present information (e.g. scientific research) on the Internet. What you see when you view a page on the Internet is your browser's interpretation of HTML. To see the HTML code of a page on the Internet, simply click "View" in the top menu of your browser and choose "Source". 6 Lecture : Kholoud Eid

7 What the following term mean: 4Web server: a system on the internet contains one or more web site 4Web site: a collection of one or more web pages 4Web pages: single disk file with a single file name 4Home pages: first page in website 7 Lecture : Kholoud Eid

8 8

9 If you want to make websites, there is no way around HTML. Even if you're using a program to create websites, such as Dreamweaver, a basic knowledge of HTML can make life a lot simpler and your website a lot better. The good news is that HTML is easy to learn and use » HTML is used to make websites. It is as simple as that! 9 Lecture : Kholoud Eid

10 HTML is an abbreviation of "Hyper Text Mark-up Language" - which is already more than you need to know at this stage. However, for the sake of good order, let us explain in greater detail.  Hyper is the opposite of linear. In the good old days - when a mouse was something the cat chased - computer programs ran linearly: when the program had executed one action it went to the next line and after that, the next line and so on. But HTML is different - you can go wherever you want and whenever you want. For example, it is not necessary to visit MSN.com before you visit HTML.net.  Text is self-explanatory.  Mark-up is what you do with the text. You are marking up the text the same way you do in a text editing program with headings, bullets and bold text and so on.  Language is what HTML is. It uses many English words. 10 Lecture : Kholoud Eid

11 Elements give structure to a HTML document and tells the browser how you want your website to be presented. Generally elements consists of a start tag, some content, and an end tag. "Tags"? Tags are labels you use to mark up the begining and end of an element. All tags have the same format: they begin with a less-than sign " ". Generally speaking, there are two kinds of tags - opening tags: and closing tags:. The only difference between an opening tag and a closing tag is the forward slash "/". You label content by putting it between an opening tag and a closing tag. HTML is all about elements. To learn HTML is to learn and use different tags. 11 Lecture : Kholoud Eid

12 »the element em emphasis text. All text between the opening tag and the closing tag is emphasised in the browser. ("em" is short for "emphasis".) »Example 1: »Will look like this in the browser: »The elements h1, h2, h3, h4, h5 and h6 is used to make headings (h stands for "heading"), where h1 is the first level and normally the largest text, h2 is the second level and normally slightly smaller text, and h6 is the sixth and last in the hierarchy of headings and normally the smallest text. 12 Lecture : Kholoud Eid Emphasised text.

13 Will look like this in the browser: 13 Lecture : Kholoud Eid This is a heading This is a subheading This is a heading This is a subheading This is a heading This is a subheading

14 » Most browsers might not care if you type your tags in upper, lower or mixed cases., or will normally give the same result. However, the correct way is to type tags in lowercase. So get into the habit of writing your tags in lowercase. 14 Lecture : Kholoud Eid

15 15 » In Lesson 1 we looked at what is needed to make a website: a browser and Notepad (or similar text editor). Since you are reading this, you most likely already have your browser open. The only thing you need to do is to open an extra browser window (open the browser one more time) so you can read this tutorial and see your new website at the same time. » Also, open Notepad (in Accessories under Programs in the Start menu)

16 » Now we are ready! » Let us start with something simple. How about a page that says: "Hurrah! This is my first website." » HTML is simple and logical. The browser reads HTML like you read English: from the top down and from left to right. Thus, an simple HTML document begins with what should come first and ends with what should come last. » The first thing you need to do is to tell the browser that you will "talk" to it in the language HTML. This is done with the tag (no surprises there). So before you do anything else type " " in the first line of your document in Notepad. 16 Lecture : Kholoud Eid

17 » As you may recall from the previous lessons, is an opening tag and must be closed with a closing tag when you are finished typing HTML. So to make sure you don't forget the HTML close tag now type " " a couple of lines down and write the rest of the document between and. » The next thing your document needs is a "head", which provides information about your document, and a "body", which is the content of the document. Since HTML is nothing if not logical, the head ( and ) is on top of the body ( and ). 17 Lecture : Kholoud Eid

18 » Your document should now look like this: 18 Lecture : Kholoud Eid Note how we structured the tags with new lines (using the Enter key) as well as indents (using the Tab key). In principle, it does not matter how you structure your HTML document. But to help you, and others reading your coding, to keep an overview, it is strongly recommended that you structure your HTML in a neat way with line breaks and indents, like the above example.

19 » As you learnt earlier, your HTML document has two parts: a head and a body. In the head section you write information about the page, while the body contains the information that constitutes the page. » For example, if you want to give the page a title which will appear in the top bar of the browser, it should be done in the "head" section. The element used for a title is title. I.e. write the title of the page between the opening tag and the closing tag : 19 Lecture : Kholoud Eid Kholoud

20 » Note that this title will not appear on the page itself. Anything you want to appear on the page is content and must therefore be added between the "body" tags. » As promised, we want the page to say “Hi! This is my first website." This is the text that we want to communicate and it therefore belongs in the body section. So in the body section, type the following: 20 Lecture : Kholoud Eid Hi ! This is my website.

21 » The p in is short for "paragraph" which is exactly what it is - a text paragraph. » Your HTML document should now look like this: 21 Lecture : Kholoud Eid Kholoud Hi ! This is my website.

22 » Done! You have now made your first real website! » Next all you have to do is to save it to your Desktop and then open it in your browser: » In Notepad choose "Save as..." under "File" in the top menu. » Choose "All Files" in the "Save as type" box. This is very important - otherwise, you save it as a text document and not as an HTML document. » Now save your document as "page1.htm" (the ending ".htm" indicates that it is an HTML document. ".html" gives the same result. I always use ".htm", but you can choose whichever of the two extensions you prefer). It doesn't matter where you save the document on your Desktop - as long as you remember where you saved it so you can find it again. 22 Lecture : Kholoud Eid

23 23 Lecture : Kholoud Eid

24 24 Lecture : Kholoud Eid Now go to the browser: In the top menu choose "Open" under "File" (or press CTRL+O). Click "Browse" in the box that appears. Now find your HTML document and click "Open". It now should say "Hi ! This is my first website." in your browser. Congratulations!

25 » Always start with the basic template we made in the previous lesson: 25 Lecture : Kholoud Eid

26 In the head section, always write a title: The title of your page. Notice how the title will be shown in the upper left corner of your browser: 26 Lecture : Kholoud Eid

27 The title is especially important because it is used by search engines (such as Google) to index your website and is shown in the search results. 27 Lecture : Kholoud Eid

28 In the body section, you write the actual content of the page. You already know some of the most important elements: 28 Lecture : Kholoud Eid Is used for paragraphs. Emphasis text. Heading Subhead Sub-subhead

29 Example: 29 Lecture : Kholoud Eid My website A Heading text, text text, text Subhead text, text text, text

30 Now it is time to learn seven new elements. In the same way you emphasise the text by putting it between the openning tag and the closing tag, you can give stronger emphasis by using the openning tag and the closing tag. Example 1: Will look like this in the browser: Likewise, you can make your text smaller using small: 30 Lecture : Kholoud Eid Stronger emphasis.

31 Example 2: Will look like this in the browser: 31 Lecture : Kholoud Eid This should be in small.

32 32 Lecture : Kholoud Eid ?


Download ppt "Lecture : Kholoud Eid University Majmaah. »Getting Started.. »What is HTML? »What can I use HTML for? »what does H-T-M-L stand for? »The HTML Basic Elements."

Similar presentations


Ads by Google