Digging in a little deeper

Slides:



Advertisements
Similar presentations
Web Development & Design Foundations with XHTML
Advertisements

Chapter 2 HTML Basics Key Concepts
Lecture 5 Use Cases and Style Sheets
Today’s Goals What is HTML?
© 2004, Robert K. Moniot Chapter 6 CSS : Cascading Style Sheets.
HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure.
XHTML and CSS Overview. Hypertext Markup Language A set of markup tags and associated syntax rules Unlike a programming language, you cannot describe.
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
Cascading Style Sheets. Defines the presentation of one or more web pages Similar to a template Can control the appearance of an entire web site giving.
HTML (HyperText Markup Language)
Chapter 4: Hypertext Markup Language Primer TECH Prof. Jeff Cheng.
Chapter 2 HTML Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
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.
1 Introduction to HTML Joshua S. Simon Collective Technologies.
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
The format is text files, with.htm or.html extension. Hard returns, tabs, and extra spaces are ignored. DO NOT use spaces in file names. File names ARE.
A Basic Web Page. Chapter 2 Objectives HTML tags and elements Create a simple Web Page XHTML Line breaks and Paragraph divisions Basic HTML elements.
Computer Information Technology – Section 3-4. HTML – The Language of the Internet Objectives: The Student will: 1. Look at HTML 2. Understand the basic.
Bare bones slide show. The format is text files, with.htm or.html extension. Hard returns, tabs, and extra spaces are ignored. DO NOT use spaces in file.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
Web Development & Design Foundations with XHTML Chapter 2 HTML/XHTML Basics.
HTML – Organizing Page Content. HTML Images img tag Required attribute: src
HTML – Organizing Page Content. HTML Images img tag Required attribute: src
HTML HyperText Markup Language ©Richard L. Goldman July 15, 2003.
Tutorial 3 Adding and Formatting Text with CSS Styles.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Introduction to HTML C151 Multi-User Operating Systems.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
`. Lecture Overview HTML Body Elements Linking techniques HyperText references Linking images Linking to locations on a page Linking to a fragment on.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Chapter 4 and 5. Objectives Introduce markup: elements and attributes How browsers interpret HTML documents Basic structure of HTML document What do style.
HTML5 and CSS3 Illustrated Unit E: Inserting and Working with Links.
Internet & World Wide Web How to Program, 5/e 1. 2.
The Internet Day 4, 9/8/11 Getting on the Internet
Cascading Style Sheets
INTRO TO WEB DEVELOPMENT html
HTML CS 4640 Programming Languages for Web Applications
>> HTML: Tags – Hyperlink, Media, Lists
HTML Basics.
Section 4.1 Section 4.2 Format HTML tags Identify HTML guidelines
Web Development & Design Foundations with HTML5 8th Edition
Marking Up with XHTML Tags describe how a web page should look
Web Development & Design Foundations with HTML5 8th Edition
CSCI-235 Micro-Computers in Science
Bare bones notes.
Display Property.
AN INTRODUCTORY LESSON TO MAKING A SIMPLE WEB PAGE By: RC Emily Solis
Intro to CSS CS 1150 Fall 2016.
CS7026: Authoring for Digital Media HTML Authoring
WEBSITE DESIGN Chp 1
Intro to CSS CS 1150 Spring 2017.
HTML Intro.
Computers and Scientific Thinking David Reed, Creighton University
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
Web Protocols, Technologies and Applications
Bare bones notes.
Marking Up with XHTML Tags describe how a web page should look
CS3220 Web and Internet Programming HTML and XML Basics
Marking Up with XHTML Tags describe how a web page should look
Cascading Style Sheets
Basics of Web Design Chapter 2 HTML Basics Key Concepts
COMS 161 Introduction to Computing
Basics of Web Design Chapter 2 HTML Basics Key Concepts
HTML CS 4640 Programming Languages for Web Applications
Marking Up with XHTML Tags describe how a web page should look
Presentation transcript:

Digging in a little deeper More about HTML Digging in a little deeper

Structural v. Semantic Markup Structural markup is using to encode information about the structure of a document. Examples: <heading>, <footer>, <div>, and <span> Semantic markup means using tags that add meaning to the content. Examples: citations, acronyms, quoted text, lists, emphasized text Structural markup such as <div> delineate major sections of the document and are also block-level elements that sit on their own line. Semantic markup such as <cite> add extra information without altering the structure of a document, and may be either inline or block elements.

An Example Which tags are structural, and which are semantic?: <html> <head> <title>Joke Page</title> </head> <body> <header><h1>My Favorite Joke</h1></header> <div> <p>What did the fish say when he <em>bumped</em> his <strong>head</strong>?</p> <p><strong>Dam!</strong></p> </div> </body> </html>

An Example Structure and semantics? <p> – This is a paragraph of information <h1> – This is a heading (in this case, heading level 1) <em> – This information should be emphasized <strong> – Emphasize this information as strongly as possible Notice how each of these tags gives extra information about the text they enclose. As before, ask the students what the four tags have in common before continuing to second bullet

So… What about Presentation? Semantic markup gives meaning to the various pieces of content on a web page. Semantic markup does not directly define how the content will appear Defining how a page will display in a view is done using Styles Styles “connect” to the semantic markup to define how an item will appear

A Brief Style Example <html> <head> <title>A Page with Style</title> <style type=“text/css”> p {color: blue; font-family: Arial, san-serif; font-size: 24pt; } </style> </head> <body> <h1>A style example</h1> <p>Because of the style definition, any text in a paragraph tag will display in blue, using an Arial font with sized at 24 points tall.</p> </body> </html> Show them this example, pointing out the style and the “p” selector. Next click will reveal the arrow

More on Styles Styles give us extensive control over the presentation of our page’s content Styles also allow us to keep the presentation of the information separate from the actual content We will discuss styles in detail as we continue in this course

More Semantic Markup Tags Unordered Lists Lists allow us to present information in a structured and ordered method The most common list is an unordered list. This frequently appears like a traditional “bullet” list Unordered lists have two parts: An outer set of tags that indicate that this content is a list of information (the <ul> and </ul> tags) An inner set of tags that define each item in the list (the <li> and </li> tags)

Unordered Lists For example: Would display as: … <ul> <li>Apples</li> <li>Pears</li> <li>Cherries</li> </ul> Would display as: Apples Pears Cherries

Ordered Lists Ordered lists are similar to unordered lists Ordered lists normally display using numbers instead of “bullet” characters For an ordered list, you use the <ol> and </ol> tags in place of the <ul> and </ul> tags Like the unordered list, you use the <li> and </li> tags to indicate an item in the list

Ordered Lists For example: Would display as: … <ol> <li>Apples</li> <li>Pears</li> <li>Cherries</li> </ol> Would display as: Apples Pears Cherries

Formatting a List The default for an unordered list is a bullet list The default for an ordered list is a numbered list How the numbers or bullets appear – even if they appear – can all be controlled using styles Lists are a very powerful tool in your web design arsenal. Later in this course, we’ll show you how to combine lists with CSS styles to create a tabbed navigation system

<!-- this is an HTML comment --> HTML Comments <!-- this is an HTML comment --> Note the double dashes and spaces Won’t validate if not formatted just right Use them and your HTML whitespace for readability!

More Structure… <div> <span> “Logical division” Block-level Used for breaking your content into discrete chunks, structurally. Very useful later on. <span> Inline Creates a section of content that spans some smaller piece of a larger chunk, like a <p>

More structure… HTML5 has introduced a bunch of structural tags for further blocking of content <main> <article> <aside> <figure> <caption> <header> <footer> <nav> Use them as they make sense!

Hypertext links So far, we’ve only been working with a single web page A web site, however, is a collection of web pages that relate to each other To “jump” from a page to another page requires the use of an anchor tag which will create a hypertext link. Here’s an example that links to a web site on another server: <a href=“http://www.rit.edu”>RIT Main Page</a> Note that if the page is on another server, we need to use the http:// protocol. The above URL to RIT’s home page is an absolute URL This is a good spot to mention URL vs. URI

Connecting with Other Web Pages The anchor tag is very easy to use if you are connecting with pages on other servers. Your web site, however, will most likely have many pages all residing on the same server in a directory structure Learning how to specify documents in directories on a Unix – or, really, any server – requires that you understand the idea of relative addressing Addresses to files are also called paths

Relative addressing to a file in the same folder This first case is the simplest. If a file is in the same folder, we can link to it just by using the file name. Example: if we have a page named proj1.html, and we want to link it to a page named bio.html that is located in the same folder, we would use the following HTML: <a href=“bio.html”>Bio Page</a>

Relative addressing to a file in a sub-folder For this next case, we want to link to a file that is located several folders “down” If we want to link index.html to proj1.html we will need to include the names of the folders in our path. See HTML below: <a href=“proj/p1/proj1.html”>P1</a>

Relative addressing to a file that is located “up” one or more levels For this next case, we want to link proj1.html to index.html, which is located two folders “up” To move “up” one level, we use “..” in our file path. To move up two levels, we use “../../” See HTML below: <a href=“../../index.html”>P1</a>

Relative addressing to a file that is located in a “sibling” directory For this next case, we want to link proj1.html to test.html, which is located two folders “up”, and one folder “down” To move “up” the 2 levels, we use “../../” in our file path. To move back down, we use the name of the folder “dev/” , followed by the name of the file we want to link to. See HTML below: <a href=“../../dev/test.html”>P1</a>

Some path notes Don’t start a path with / This goes to the root (usually WAY above your user account) Remember rules for filenames in your paths No spaces No special characters (?, !, *, etc.) Avoid caps (case-sensitive)

And now… Do the ICE!