Вы находитесь на странице: 1из 9

INTERNET PROGRAMMING ITD 21203

Introduction HTML
HTML HyperText Markup Language Hypertext the way in which Web pages (HTML documents) are linked together Markup Language how HTML works. Markup language actually mark up a text document with tags that tell a Web browser how to structure/display it. An HTML file must have an htm or html file extension An HTML file can be created using a simple text editor

Do you want to try it?


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

Understand HTML : 4 Key Concepts


1. ELEMENTS All HTML pages are made up of elements Think of an element as a container in which a portion of a page is placed Whatever is contained inside the element will take on the characteristics of that element e.g. :- to construct a form, you need the form element <form> </form>

Understand HTML : 4 Key Concepts


2. TAGS The terms element and tags used interchangeably An element is made of two tags: an opening tag and a closing tag A simple paragraph might look like this: <p>This is an HTML paragraph</p> Some element do not use closing tags called empty element. e.g. : the line break element <br /> does not require a closing tag

Understand HTML : 4 Key Concepts


3. ATTRIBUTES & VALUES An attribute is used to define the characteristics of an element and is placed inside the elements opening tag. e.g. : to specify the size of an image or graphic on your page, with image element along with the height and width attributes:
<img src="sun.jpg" width="200" height="200">

Values work together with attributes to complete the definition if an elements characteristics
<font color=blue>This is BLUE</font>

Understand HTML : 4 Key Concepts


4. NESTING You might apply more than one element to a portion of your page. Therefore, its essential to understand the concept of nesting Nesting simply means that elements must never overlap Properly nested elements are contained inside one another, as the following: <a> <b> <c> </c> </b> </a>

File Names & URLs


File names
mywebpage.html

URLs
http://www.mysite.com/hmmm/mywebpage.html

HTML vs XHTML
XHTML =
Extensible HyperText Markup Language

1. XHTML elements must be properly nested 2. XHTML elements must always be closed 3. XHTML elements must be in lowercase 4. XHTML documents must have one root element

Вам также может понравиться