HTML Images - The <img> Tag and the Src Attribute

Similar documents
Part 1: HTML Language HyperText Make-up Language

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

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

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

Computer Programming. Dr. Deepak B Phatak Dr. Supratik Chakraborty Department of Computer Science and Engineering IIT Bombay

MMGD0204 Web Application Technologies. Chapter 3 HTML - TEXT FORMATTING

Skill Area 323: Design and Develop Website. Multimedia and Web Design (MWD)

A HTML document has two sections 1) HEAD section and 2) BODY section A HTML file is saved with.html or.htm extension

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

WTAD Text Editors for HTML. Text Editors: Kate HTML. (HyperText Markup Language)

WTAD. Unit -1 Introduction to HTML (HyperText Markup Language)

11. HTML5 and Future Web Application

recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML)

CSC Web Programming. Introduction to HTML

CSC 121 Computers and Scientific Thinking

Creating Web Pages Using HTML

A Balanced Introduction to Computer Science, 3/E

HTML What is HTML Hyper Text Markup Language is a computer based language used to create WebPages.

Html basics Course Outline

By Ryan Stevenson. Guidebook #2 HTML

Table of Contents. MySource Matrix Content Types Manual

Programmazione Web a.a. 2017/2018 HTML5

introduction to XHTML

Lesson: 6 Database and DBMS an Introduction. Lesson: 7 HTML Advance and features. Types of Questions

Hyper Text Marimp Language (HTML)

ITNP43: HTML Lecture 3

I-5 Internet Applications

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

HTML. Asst. Prof. Dr. Kanda Runapongsa Saikaew Department of Computer Engineering Khon Kaen University

A Brief Introduction to HTML

Structure Bars. Tag Bar

ICT IGCSE Practical Revision Presentation Web Authoring

HTML and CSS Lecture 15 COMPSCI111/111G SS 2018

CSE 3. Marking Up with HTML. Comics Updates Shortcut(s)/Tip(s) of the Day Google Earth/Google Maps ssh Anti-Spyware

Introduction to HTML. SSE 3200 Web-based Services. Michigan Technological University Nilufer Onder

Creating Web Pages. Getting Started

CSC Web Technologies, Spring HTML Review

Tables *Note: Nothing in Volcano!*

HTMLnotesS15.notebook. January 25, 2015

Web Development & Design Foundations with HTML5 & CSS3 Instructor Materials Chapter 2 Test Bank

5/17/2009. Marking Up with HTML. An HTML Web Page File. Tags for Bold, Italic, and underline. Structuring Documents

INTRODUCTION TO WEB USING HTML What is HTML?

Web Development & Design Foundations with HTML5 & CSS3 Instructor Materials Chapter 2 Test Bank

Basic HTML. Lecture 14. Robb T. Koether. Hampden-Sydney College. Wed, Feb 20, 2013

Hyper Text Markup Language HTML: A Tutorial

HTML, beyond the basics

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Basic HTML. Lecture 14. Robb T. Koether. Hampden-Sydney College. Wed, Feb 20, 2013

What You Will Learn Today

UNIT-02 Hyper Text Markup Language (HTML) UNIT-02/LECTURE-01 Introduction to Hyper Text Markup Language (HTML) About HTML: [RGPV/Dec 2013(4)]

Web Design and Development ACS Chapter 12. Using Tables 11/23/2017 1

Dreamweaver CS3 Concepts and Techniques

Fall Semester 2016 (2016-1)

HTML BEGINNING TAGS. HTML Structure <html> <head> <title> </title> </head> <body> Web page content </body> </html>

UNIT II Dynamic HTML and web designing

Basic HTML Lecture 14

Final Exam Study Guide

COMPSCI 111 / 111G An introduction to practical computing

CSS Weebly! td{ padding:20px}

Understanding this structure is pretty straightforward, but nonetheless crucial to working with HTML, CSS, and JavaScript.

Page Layout Using Tables

ICT IGCSE Practical Revision Presentation Web Authoring

Comp-206 : Introduction to Software Systems Lecture 22. Alexandre Denault Computer Science McGill University Fall 2006

Table-Based Web Pages

Introduction to Computers and Their Applications

CSC 101: PreLab Reading for Lab #4 More HTML (some of this reading on Tables and Images are based on previous writings of Prof William Turkett)

Chapter 4: Marking Up With HTML: A Hypertext tmarkup Language Primer

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

Chapter 4. Introduction to XHTML: Part 1

Marking Up with HTML. Tags for Bold, Italic, and underline. An HTML Web Page File. Chapter 4: Marking Up With HTML: A. Formatting with Tags:

How the Internet Works

Creating web pages Chapter 5. Structuring contents

LING 408/508: Computational Techniques for Linguists. Lecture 14

Web Programming Week 2 Semester Byron Fisher 2018

Chapter 4 Notes. Creating Tables in a Website

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

Learning Objectives. Review html Learn to write a basic webpage in html Understand what the basic building blocks of html are

HTML Hints & Tips. HTML is short for HyperText Markup Language.

Indian Institute of Technology Kharagpur. HTML Part III. Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T.

The default style for an unordered (bulleted) list is the bullet, or dot. You can change the style to either a square or a circle as follows:

Creating a simple HTML page

Management Information Systems

Creating an Accessible Word Document. Mac Computer. Revised November 28, Adapted from resources created by the Sonoma County Office of Education

Tables & Lists. Organized Data. R. Scott Granneman. Jans Carton

Introduction to Multimedia. MMP100 Spring 2017 thiserichagan.com/mmp100

HTML. LBSC 690: Jordan Boyd-Graber. October 1, LBSC 690: Jordan Boyd-Graber () HTML October 1, / 29

Web Development and Design Foundations with HTML5 8th Edition

FUNDAMENTALS OF WEB DESIGN (405)

HTML Tags <A></A> <A HREF=" CNN </A> HREF

COMPUTER APPLICATIONS IN BUSINESS FYBMS SEM II

HTML and CSS COURSE SYLLABUS

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

Bok, Jong Soon

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

Skill Area 323: Design and Develop Website. Multimedia and Web Design (MWD)

Web Publishing with HTML

html: lists, images, tables network basics UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010 See notes 09/16/10 Go to the validator

Introduction to Computer Science (I1100) Internet. Chapter 7

Chapter 1 Self Test. LATIHAN BAB 1. tjetjeprb{at}gmail{dot}com. webdesign/favorites.html :// / / / that houses that information. structure?

Markup Language SGML: Standard Generalized Markup Language. HyperText Markup Language (HTML) extensible Markup Language (XML) TeX LaTeX

Transcription:

WEB DESIGN

HTML Images - The <img> Tag and the Src Attribute In HTML, images are defined with the <img> tag. The <img> tag is empty, which means that it contains attributes only, and has no closing tag. To display an image on a page, you need to use the src attribute. Src stands for "source". The value of the src attribute is the URL of the image you want to display. Syntax for defining an image: <img src="url" alt="some_text">

HTML Images - The <img> Tag and the Src Attribute The URL points to the location where the image is stored. An image named "boat.gif", located in the "images" directory on "www.iqbal.com" has the URL: http://www.iqbal.com/images/boat.gif. The browser displays the image where the <img> tag occurs in the document. If you put an image tag between two paragraphs, the browser shows the first paragraph, then the image, and then the second paragraph.

HTML Images - The Alt Attribute The required alt attribute specifies an alternate text for an image, if the image cannot be displayed. The value of the alt attribute is an author-defined text: <img src="boat.gif" alt="big Boat"> The alt attribute provides alternative information for an image if a user for some reason cannot view it (because of slow connection, an error in the src attribute, or if the user uses a screen reader).

HTML Images - Set Height and Width of an Image The height and width attributes are used to specify the height and width of an image. The attribute values are specified in pixels by default: <img src="pulpit.jpg" alt="pulpit rock" width="304" height="228">

HTML Images - Set Height and Width of an Image Tip: It is a good practice to specify both the height and width attributes for an image. If these attributes are set, the space required for the image is reserved when the page is loaded. However, without these attributes, the browser does not know the size of the image. The effect will be that the page layout will change during loading (while the images load).

Basic Notes - Useful Tips Note: If an HTML file contains ten images - eleven files are required to display the page right. Loading images takes time, so my best advice is: Use images carefully. Note: When a web page is loaded, it is the browser, at that moment, that actually gets the image from a web server and inserts it into the page. Therefore, make sure that the images actually stay in the same spot in relation to the web page, otherwise your visitors will get a broken link icon. The broken link icon is shown if the browser cannot find the image.

HTML Image Tags

HTML Table Example:

HTML Tables Tables are defined with the <table> tag. A table is divided into rows (with the <tr> tag), and each row is divided into data cells (with the <td> tag). td stands for "table data," and holds the content of a data cell. A <td> tag can contain text, links, images, lists, forms, other tables, etc.

Table Example <table border="1"> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>

Table Example How the HTML code above looks in a browser:

HTML Tables and the Border Attribute If you do not specify a border attribute, the table will be displayed without borders. Sometimes this can be useful, but most of the time, we want the borders to show. To display a table with borders, specify the border attribute: <table border="1"> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> </table>

HTML Table Headers Header information in a table are defined with the <th> tag. All major browsers display the text in the <th> element as bold and centered. <table border="1"> <tr> <th>header 1</th> <th>header 2</th> </tr> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>

HTML Table Headers How the HTML code above looks in your browser:

HTML Table Tags

The most common HTML lists are ordered and unordered lists:

HTML Unordered Lists An unordered list starts with the <ul> tag. Each list item starts with the <li> tag. The list items are marked with bullets (typically small black circles). <ul> <li>coffee</li> <li>milk</li> </ul> How the HTML code above looks in a browser:.

HTML Ordered Lists An ordered list starts with the <ol> tag. Each list item starts with the <li> tag. The list items are marked with numbers. <ol> <li>coffee</li> <li>milk</li> </ol> How the HTML code above looks in a browser:.

HTML Definition Lists A definition list is a list of items, with a description of each item. The <dl> tag defines a definition list. The <dl> tag is used in conjunction with <dt> (defines the item in the list) and <dd> (describes the item in the list): <dl> <dt>coffee</dt> <dd>- black hot drink</dd> <dt>milk</dt> <dd>- white cold drink</dd> </dl>

HTML Definition Lists How the HTML code above looks in a browser:

Basic Notes - Useful Tips Tip: Inside a list item you can put text, line breaks, images, links, other lists, etc.

HTML List Tags

Try it yourself Let s try