Unit 2, cont. September 12 More HTML. Attributes Some tags are modifiable with attributes This changes the way a tag behaves Modifying a tag requires.

Slides:



Advertisements
Similar presentations
Session 2 Introduction to HyperText Markup Language 4 (HTML 4) Matakuliah: M0114/Web Based Programming Tahun: 2005 Versi: 5.
Advertisements

CREATED BY : VIRAL M.KORADIYA. Anchor elements are defined by the element. The element accepts several attributes, but either the Name or HREF attribute.
Internet Services and Web Authoring (CSET 226) Lecture # 5 HyperText Markup Language (HTML) 1.
HTML: HyperText Markup Language Hello World Welcome to the world!
Chapter 2 HTML Basics Key Concepts
Cascading Style Sheets
INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
MMDE5011 – INTERACTIVE MEDIA PRACTICE 1 WEEK 1: INTRODUCTION TO HTML5
Chapter 4 Marking Up With Html: A Hypertext Markup Language Primer.
Unit 2, cont. September 14 HTML,Validating your pages, Publishing your site.
Assignment 1 Pointers ● Be sure to use all tags properly – Don't use a tag for something it wasn't designed for – Ex. Do not use heading tags... for regular.
Tutorial 8 Designing a Web Site with Frames. XP Objectives Explore the uses of frames in a Web site Create a frameset consisting of rows and columns of.
Marking Up With Html: A Hypertext Markup Language Primer
Create a Web Site with Frames
XP Tutorial 5New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Designing a Web Site with Frames Using Frames to Display Multiple Web Pages Tutorial.
HTML Tags. Objectives Know the commonly used HTML tags Create a simple webpage using the HTML tags that will be discussed.
ULI101: XHTML Basics (Part III) Introduction to XHTML / Continued … Block-Level vs. Inline Elements (tags) Manipulating Text,  , Text Characteristics,,,,,,,,,,,,,,,
Chapter 4 Fluency with Information Technology L. Snyder Marking Up With HTML: A Hypertext Markup Language Primer.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Headings, Paragraphs, Formatting, Links, Head, CSS, Images
ULI101 – XHTML Basics (Part II) What is Markup Language? XHTML vs. HTML General XHTML Rules Block Level XHTML Tags XHTML Validation.
HTML HTML stands for "Hyper Text Mark-up Language“. Technically, HTML is not a programming language, but rather a markup language. Used to create web pages.
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
.  Entertain  Inform  Educate  Blogs  Sell  Date  Gamble  Religion.
Amber Annett David Bell October 13 th, What will happen What is this business about personal web pages? Designated location of your own web page.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
1 Essential HTML coding By Fadi Safieddine (Week 2)
Agenda Links External and Internet Links Anchor Tag Text Hyperlinks Image Hyperlinks Images Image Attributes: src, alt, width, height, align, border.
Chapter 4: Hypertext Markup Language Primer TECH Prof. Jeff Cheng.
Images (1) Three most popular formats – Graphics Interchange Format (GIF) – Joint Photographic Experts Group (JPEG) – Portable Network Graphics (PNG) –
Images in HTML PowerPoint How images are used in HTML.
HTML history, Tags, Element. HTML: HyperText Markup Language Hello World Welcome to the world!
Chapter 2 HTML Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
XHTML Louise Soe updated September 2009.
1 CSC 121 Computers and Scientific Thinking David Reed Creighton University HTML and Web Pages.
Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and attributes Create.
DHTML AND JAVASCRIPT Genetic Computer School LESSON 2 HTML TAGS G H E F.
Department of Information Technology Chapter 8 - Creating Hypertext links Lecturer: Ms Melinda Chung.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Tutorial 8 Designing a Web Site with Frames. XP Objectives Explore the uses of frames in a Web site Create a frameset consisting of rows and columns of.
Web Programming Basics of HTML. HTML stands for Hyper Text Mark-up Language A mark-up language is different than those that you have learned before in.
Unit 3 Day 6 FOCS – Web Design. Journal Unit #3 Entry #4 Write the source code that would make the following display on a rendered page: Shopping List.
XHTML1 Images N100 Building a Simple Web Page. XHTML2 The Element The src attribute specifies the filename of an image file To include the src attribute.
HTML: Hyptertext Markup Language Doman’s Sections.
Tutorial 8 Designing a Web Site with Frames. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore the uses of frames.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Adding Graphical Elements Essentials for.
HTML Lesson 3 Hyper Text Markup Language. Assignment Part 2  Set the file name as “FirstName2.htm”  Set the title as “FirstName LastName First Web Site”
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
HTML IMAGES. CONTENTS IMG Tag Alt Attribute Setting Width and Height Of An Image Summary Exercise.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Links in HTML What you need to know….. Hyperlinks or links Millions of linked web pages make up the World Wide Web Used to connect a web page to another.
HTML Chapter 4 Source: CSE 190 M (Web Programming) lecture notes, es/slides/lecture02-basic_xhtml.html.
Spiderman ©Marvel Comics Creating Web Pages (part 1)
1 More About HTML Images and Links. 22 Objectives You will be able to Include images in your HTML page. Create links to other pages on your HTML page.
HTML HYPER TEXT MARKUP LANGUAGE. INTRODUCTION Normal text” surrounded by bracketed tags that tell browsers how to display web pages Pages end with “.htm”
REEM ALMOTIRI Information Technology Department Majmaah University.
Links and Images. Links HTML uses a hyperlink to link to another document on the Web A hyperlink can be either text or a picture Links are created with.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
HTML HTML stands for Hyper Text Markup Language. HTML is used in making the base of a Website You can just use an online website maker like weebly.com.
Lecture 8 Introduction to Web Programming. Announcement  First In-class exam will be on Oct. 10 (Wednesday)  2.50pm – 4.05pm  Exam will cover all materials.
Tutorial #1 Using HTML to Create Web Pages. HTML, XHTML, and CSS HTML – HyperText Markup Language The tags the browser uses to define the content of the.
Lecture 6, MAT 279, Fall HTML Introduction (cont.) 9/17/2009.
HTML Basics.
Section 4.1 Section 4.2 Format HTML tags Identify HTML guidelines
Cascading Style Sheets™ (CSS)
Presentation transcript:

Unit 2, cont. September 12 More HTML

Attributes Some tags are modifiable with attributes This changes the way a tag behaves Modifying a tag requires two parts: –The attributes you want to modify –The value of the attributes Always goes into the opening tag Quotes around the value

Horizontal Rule Example is the horizontal rule tag Normally goes all the way across the screen Say, we want it to go halfway across: – is an empty tag so we can immediately close it

Multiple Attributes Tags can have more than one attribute Format for those tags are: The order of the attributes does not matter Some attributes are listed in a certain order by matter of convention –Follow convention when possible –Inserting images is an example

Multiple Horizontal Rule Attributes What if we want to change the thickness and the width of the horizontal rule? Now lets also make it solid:

Attribute Example with Text To change the font, use the style attribute If we wanted a paragraph with red text: – What about changing the font size? – And if we want to change both? – Don’t forget the semi-colon!

Entities Special characters can’t just be typed into an HTML document For instance the “ Browser will assume that what comes after the “<“ is the tag! To print special characters like this, use entities

Entities All entities start with an ampersand and end with a semi-colon Entities look something like: –< which produces the < or less than symbol Some examples: –> “>”, greater than –& “&”, or ampersand –" “ “ ” quote marks Not all browsers can display all entities….use sparingly

Comments Comments are a way to include text in the document that you don’t want displayed Why? –To place notes for yourself, or others –To “comment out” HTML so that it is not displayed Comments begin with

Hyperlinks Hyperlinks are what connect one web page to another Shortened to the term “links” A webpage with no link to it cannot be found by a web crawler Make sure all your pages are linked together (properly) or we won’t find it either

Links, cont. Links are usually displayed differently than normal text in a web page Often it is a different color and underlined –But not always –Often change color once the user has visited that link as well –Should be able to tell it’s a link

How to Create a link The tag is used to create a link The href attribute is the URL of the destination of the link The contents of the tag are the text of the link –Or could even be a picture content

Simple Link Example This is what a link looks likehttp:// This is what a link looks like

More Complicated This is a more interesting linkhttp:// This is a more interesting link

Absolute URLs Absolute URLs are what the previous examples are They specify the full address of a web page Includes the scheme, server, and path Used mostly for off-site links –Links that go away from the current web site

Why Use Relative URLs? Imagine for every page on a website having to put in the entire web address – – – First, its tedious to keep having to type the full address If the page moves to a new server, every single URL would have to be fixed

What are Relative URLs Allow us to link to pages relative to the current page Much shorter to type! Allows websites to be moved from one location to another –Can build entire site on home computer then upload to the server

How Relative URLs Work Everything with relative URLs is based on directories If the destination page is in the same directory as the current page URL is just the “destinationpage.html” Example: some text

How Relative URLs Work If the destination page is down a directory –URL: “destinationDirectory/destinationPage.html” –For each sub directory add its directory/ before the page Example: September 12

Relative URLs, cont. If the destination page is in a directory above the current directory –For each directory “up” add a../ –URL: “../destinationPage.html” “up” and “down” can be combined: –URL: “../../directory1/directory2/mypage.html”

Relative URL Example In class example

Images Insert images using the tag has 2 required attributes –src : indicates the URL of the image –alt : specifies alternative text for the image is an empty tag Why text for an image? –Image cannot be loaded –Image hasn’t been downloaded yet –Browser doesn’t support images

alt Attribute Truly important for the visually impaired Should attempt to describe the image as much as possible, without going overboard –i.e. no paragraphs (available from useful links page) –Talks about using alt properly Should try to point out the feature of the image that is relevant Try to make it readable inline with the rest of the text on page The alternative text in your assignments will be part of your marks

Simple Image Example Lets say we want to insert the image sfuAQ.jpg and its in the same directory as the page we want to put it on

Image in Another Directory Images are specified by their URL Just like a webpage, you link them relative to the page (when possible) Lets say that the sfuAQ.jpg is stored in a folder called “pics”

Specifying Image Size Good idea to specify image size –Allows the page to be loaded more correctly before images are downloaded –Browser already knows how big of a space to leave for the image Specify the size in pixels –Use height and width attributes Browser inserts the image like a character You should know how to specify the image size

Specifying Image Size Example Lets insert sfuAQ.jpg again with a size of 240 x 120 pixels

So many tags, rules, etc. There are quite a few tags, attributes, entities, etc. Where can you find information on them? Several links from the course webpage –1. XHTML 1.0 Reference (found in reference section) –2. Useful links has other HTML sites, including tutorials

XHTML 1.0 Reference Syntax: general usage of the tag –Empty tags are shown with the short-form closing tag, e.g. Attribute Specification: attributes for the tag and their possible values Contents: what can be put inside the tag – tags can be put inside tags Contained in: what can the tags go into – tag can go into a tag,, etc. Remaining text describes what the tag is for, how it should be used, and what attributes it has

Deprecated Tags and Attributes In the XHTML 1.0 reference, some text is lighter colored This indicates that the tag or attribute is deprecated Deprecated is used to describe features which are obsolete and are being phased out In the future, you will not necessarily need to use these deprecated tags and attributes, but for assignment 1, it is okay.

Questions?