Presentation is loading. Please wait.

Presentation is loading. Please wait.

HTML (HyperText Markup Language)

Similar presentations


Presentation on theme: "HTML (HyperText Markup Language)"— Presentation transcript:

1 HTML (HyperText Markup Language)

2 Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan
mampu : Memahami dasar-dasar dalam mendesain Web yang baik Mengetahui sintaks-sintaks dasar pada HTML

3 World Wide Web World Wide Web (commonly shortened to the Web) is a system of interlinked hypertext documents accessed via the Internet. With a Web browser, a user views Web pages that may contain text, images, videos, and other multimedia and navigates between them using hyperlinks.

4 HTML HyperText Markup Language (HTML) is a markup language used to structure text and multimedia documents and to set up hypertext links between documents, used extensively on the World Wide Web. Web pages are built with HTML tags (codes) embedded in the text. HTML defines the page layout, fonts and graphic elements. In order to make pages interactive, programming code can be embedded in an HTML page. For example : JavaScript and VBScript

5 HTML Tags HTML Tags are commands written between less than (<) and greater than (>) signs, also known as angle brackets, that indicate how the browser should display the text.

6 Basic HTML Tags Tag Description <html> </html> Defines an HTML document <body> </body> Defines the document's body <h1> </h1> to <h6> </h6> Defines header 1 to header 6 <p> </p> Defines a paragraph <br> Inserts a single line break <hr> Defines a horizontal rule <!-- --> Defines a comment Note : browser will recognize HTML code whether you type it all in all caps or in small letters or in a mixture of both.

7 Basic HTML Tags (cont..) Headings Paragraphs Line breaks
<h1>This is a heading</h1> Paragraphs <p>This is a paragraph</p> Line breaks <p>This<br>is a paragraph<br>with line breaks</p> <!-- This is a comment -->

8 HTML Tag Attributes Attributes provide additional information to an HTML element. Attributes are always specified in the start tag of an HTML element. Attribute values should always be enclosed in quotes. Double style quotes are the most common, but single style quotes are also allowed. Example : name="value". Examples : <h1 align="center"> has additional information about the alignment.</h1> <body bgcolor="yellow"> has additional information about the background color.</body> <table border="1"> has additional information about the border around the table.</table>

9 Nesting Tags In some cases, you may want to modify your page contents with more than one tag. There are two things to keep in mind here : Not all tags can contain all other kinds of tags. Order is everything. Whenever you use a closing tag it should correspond to the last unclosed opening tag. Example : <H1>Web<I>Animation</I></H1>  correct <H1>Web<I>Animation</H1></I>  incorrect

10 Simple HTML Code

11 Text Formatting Tags Tag Description <b> </b>
Defines bold text <big> </big> Defines big text <em> </em> Defines emphasized text  <i> </i> Defines italic text <small> </small> Defines small text <strong> </strong> Defines strong text <sub> </sub> Defines subscripted text <sup> </sup> Defines superscripted text Bina Nusantara

12 Text Formatting Tags (cont..)

13 Changing the Font You can type <font face=“fontname1, fontname2”>, where fontname2 is your second choice of fonts, should the user not have the first font installed on his system. Size=“n”, where n is a number from 1 to 7. The default is 3. Values 1 to 7 for basefont correspond to 8, 10, 12, 14, 18, 24, 36 points respectively.

14 HTML Background The <body> tag has two attributes where you can specify backgrounds. The background can be a color or an image. Bgcolor The bgcolor attribute specifies a background-color for an HTML page. Background The background attribute specifies a background-image for an HTML page. If the image is smaller than the browser window, the image will repeat itself until it fills the entire browser window.

15 HTML Images In HTML, images are defined with the <img> tag.
To display an image on a page, you need to use the src attribute. The value of the src attribute is the URL of the image you want to display on your page. The “alt” attribute is used to define an "alternate text" for an image. The "alt" attribute tells the reader what he or she is missing on a page if the browser can't load images.

16 HTML Images (cont..) <html> <body> <p>
<img src="hackanm.gif“ width="20" height="20"> </p> <img src="hackanm.gif“ width="45" height="45"> <img src="hackanm.gif“ width="70" height="70"> </body> </html>

17 Embedding Multimedia One of the things that has made the Web so popular is the fact that you can add graphics, sound, animations, and movies to your Web pages.

18 HTML Colors HTML colors can be defined as a hexadecimal notation for the combination of Red, Green, and Blue color values (RGB). The lowest value that can be given to one light source is 0 (hex #00) and the highest value is 255 (hex #FF).

19 Lists Unordered List : the list items are marked with bullets (typically small black circles). An unordered list starts with the <ul> tag. Each list item starts with the <li> tag. Ordered List : The list items are marked with numbers. An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.

20 Lists (cont..) Definition List : This is a list of terms and explanation of the terms. A definition list starts with the <dl> tag. Each definition-list term starts with the <dt> tag. Each definition-list definition starts with the <dd> tag. Inside a unordered list, ordered list, and definition-list definition you can put paragraphs, line breaks, images, links, other lists, etc.

21 Different Types of Ordered & Unordered List
Ordered Lists <ol> <ol type="A"> <ol type="a"> <ol type="I"> <ol type="i"> Unordered Lists <ul type="disc"> <ul type="circle"> <ul type="square"> 1. Text A. Text a. Text I. Text i. Text Text

22 Nested List


Download ppt "HTML (HyperText Markup Language)"

Similar presentations


Ads by Google