Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to HTML.

Similar presentations


Presentation on theme: "Introduction to HTML."— Presentation transcript:

1 Introduction to HTML

2 What is a HTML File? HTML stands for Hyper Text Markup Language
An HTML file is a text file containing small markup tags The tags tell the built in function in the web browser how to structure the text. For instance put text in a bold font.

3 What is a HTML File? The markup tags tell the Web browser how to display the page An HTML file must have an htm or html file extension An HTML file can be created using a simple text editor

4 When you learn a language, you need to learn rules, called syntax
Elements to define the structure of the document Examples of elements are: head, body, p, ul

5 When you insert these elements in your text you surround them with < (less than) and > (greater than) symbols. You now have <head>, <body>, <p> and <ul>. These are no longer elements; they are now called tags.

6 Type in the following text in a simple text editor:
<html> <head> <title>Title of page</title> </head> <body> This is my first homepage. <b>This text is bold</b> </body> </html>

7 Example Explained The first tag in your HTML document is <html>. This tag tells your browser that this is the start of an HTML document. The last tag in your document is </html>. This tag tells your browser that this is the end of the HTML document.

8 The text between the <head> tag and the </head> tag is header information. Header information is not displayed in the browser window. The text between the <title> tags is the title of your document. The title is displayed in your browser's caption. The text between the <body> tags is the text that will be displayed in your browser. The text between the <b> and </b> tags will be displayed in a bold font.

9 Save the file as "mypage.html". 
Start your Internet browser. Select "Open" (or "Open Page") in the File menu of your browser. A dialog box will appear. Select "Browse" (or "Choose File") and locate the HTML file you just created - "mypage.htm" - select it and click "Open". Now you should see an address in the dialog box, for example "C:\MyDocuments\mypage.html". Click OK, and the browser will display the page. Or write the path in the address window. E.g. C:\ MyDocuments\mypage.html. Or double-click on icon

10

11

12 HTML Tags HTML tags are used to mark-up HTML elements
HTML tags are surrounded by the two characters < and > The surrounding characters are called angle brackets HTML tags normally come in pairs like <b> and </b> The first tag in a pair is the start tag, the second tag is the end tag The text between the start and end tags is the element content HTML tags are not case sensitive, <b> means the same as <B>

13 This is an HTML element:
<b>This text is bold</b> The HTML element starts with a start tag: <b> The content of the HTML element is: This text is bold. The HTML element ends with an end tag: </b> The purpose of the <b> tag is to define an HTML element that should be displayed as bold.

14 <!-- This is a comment -->
Comments in HTML <!-- This is a comment --> The comment tag is used to insert a comment in the HTML source code. A comment will be ignored by the browser. You can use comments to explain your code, which can help you when you edit the source code at a later date. Note that you need an exclamation point after the opening bracket, but not before the closing bracket.

15 Basic HTML Tags Tag Description <html> Defines an HTML document
<body> Defines the document's body <h1> to <h6> Defines header 1 to header 6 <p> Defines a paragraph <br> Inserts a single line break <hr> Defines a horizontal rule <!--> Defines a comment

16 Adding images with the IMG element
Use the IMG element to add an image to your page simply. The IMG element includes everything you need in the start tag and does not have end tags. <IMG src=“images/seeds.jpg” alt=“picture of seeds” height=“100” width=“100”> src: URL of image Alt: short description Height, width: height and width of image

17

18

19 To publish a website on the internet – if you want it to be seen by others
If you have a internet service provider you often have a space on their web server to publish your sites To transfer your files to a web hotel you need a FTP-program (file transfer protocol) You often need hostname, user Id, password Call the first page (start page) index.html. The web server is then automatically sending this site when someone is asking for the url-address.

20 How to retrieve a web page
Ask for certain address client A client ask the webserver for a certain site, which the server finds out and send back to the client. Web server The web server finds the document and sends it back to the client computer.

21 More to read about HTML on the internet
Links to tutorial from your web site


Download ppt "Introduction to HTML."

Similar presentations


Ads by Google