INFORMATICA GENERALE 2014/2015 LINGUAGGI DI MARKUP HTML

Similar documents
Short notes on webpage programming languages

Dreamweaver. Introduction to Editing Web Pages

Taking your HTML s to the Next Level. Presented by: Joey Trogdon, Asst. Director of Financial Aid & Veterans Affairs Randolph Community College

Creating web pages Chapter 3. HTML Basic Concepts

Module 6 Web Page Concept and Design: Getting a Web Page Up and Running

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

How To Use Dreamweaver With Your Computer Or Your Computer (Or Your Computer) Or Your Phone Or Tablet (Or A Computer)

Getting Started with KompoZer

Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University

Contents. Downloading the Data Files Centering Page Elements... 6

Intro to Web Development

Website Development Komodo Editor and HTML Intro

Contents. Introduction Downloading the Data Files... 2

HTML and CSS. Elliot Davies. April 10th,

USING THE INTRO (SPLASH) PAGE

Introduction to Web Development

Missing cat website HTML&CSS. The Mission:

HTML Basics(w3schools.com, 2013)

CREATING WEB PAGES USING HTML INTRODUCTION

Joomla! 2.5.x Training Manual

HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout

ADOBE DREAMWEAVER CS3 TUTORIAL

HTML, CSS, XML, and XSL

Adobe Dreamweaver - Basic Web Page Tutorial

WEB DEVELOPMENT IA & IB (893 & 894)

Web. Programming. Hans- Pe0er Halvorsen, M.Sc. h0p://home.hit.no/~hansha/?page=sojware_development

Jadu Content Management Systems Web Publishing Guide. Table of Contents (click on chapter titles to navigate to a specific chapter)

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.

Quick Guide to the Cascade Server Content Management System (CMS)

Introduction to Web Design Curriculum Sample

Drupal Training Guide

Lesson Review Answers

Saving work in the CMS Edit an existing page Create a new page Create a side bar section... 4

How To Write A Web Page In Html

How To Create A Web Page On A Windows (For Free) With A Notepad) On A Macintosh (For A Freebie) Or Macintosh Web Browser (For Cheap) On Your Computer Or Macbook (

Introduction to XHTML. 2010, Robert K. Moniot 1

USER GUIDE. Unit 4: Schoolwires Editor. Chapter 1: Editor

Web Publishing Basics 2

Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates

Wakanda Studio Features

Basic Website Maintenance Tutorial*

Your Blueprint websites Content Management System (CMS).

ANATOMY OF A WEB PAGE...

Chapter 1. Introduction to web development

MadCap Software. Import Guide. Flare 11

Designing HTML s for Use in the Advanced Editor

CIS 467/602-01: Data Visualization

Caldes CM12: Content Management Software Introduction v1.9

CREATING A NEWSLETTER IN ADOBE DREAMWEAVER CS5 (step-by-step directions)

Further web design: HTML forms

Quick Reference Guide

CS134 Web Site Design & Development. Quiz1

ICE: HTML, CSS, and Validation

Fast track to HTML & CSS 101 (Web Design)

Web Editing Basics 1 TOPICS

Creating Accessible Word Documents

HTML Fundamentals IN THIS APPENDIX

Citrix StoreFront. Customizing the Receiver for Web User Interface Citrix. All rights reserved.

Building Faculty Websites in Cascade

Go Kiwi Internet Content Management System Version 5.0 (K5) TRAINING MANUAL

Adobe Dreamweaver Student Organizations Publishing Details Getting Started Basic Web Page Tutorial For Student Organizations at Dickinson College *

ART 379 Web Design. HTML, XHTML & CSS: Introduction, 1-2

Basic Website Creation. General Information about Websites

Creating HTML authored webpages using a text editor

Web Development I & II*

Website Builder Documentation

Search Engine Optimisation (SEO) Guide

Creating Web Pages with Dreamweaver CS 6 and CSS

Dreamweaver CS6 Basics

LAB MANUAL CS (22): Web Technology

Learnem.com. Web Development Course Series. Quickly Learn. Web Design Using HTML. By: Siamak Sarmady

HOW TO USE THIS GUIDE

Converting Prospects to Purchasers.

Web Accessibility means that a website is accessible if everyone, regardless of ability, can access the website and retrieve all the information

Setting up Web Material. An introduction

Programming exercises (Assignments)

7 th Annual LiveText Collaboration Conference. Advanced Document Authoring

Web Portal User Guide. Version 6.0

Intro to Web Design. ACM UIUC

Essential HTML & CSS for WordPress. Mark Raymond Luminys, Inc mraymond@luminys.com

SUBJECT CODE : 4074 PERIODS/WEEK : 4 PERIODS/ SEMESTER : 72 CREDIT : 4 TIME SCHEDULE UNIT TOPIC PERIODS 1. INTERNET FUNDAMENTALS & HTML Test 1

UCL INFORMATION SERVICES DIVISION INFORMATION SYSTEMS. Silva. Introduction to Silva. Document No. IS-130

Dreamweaver: Getting Started Website Structure Why is this relevant?

ITP 101 Project 3 - Dreamweaver

Microsoft Expression Web Quickstart Guide

Help on Icons and Drop-down Options in Document Editor

CONTENTM WEBSITE MANAGEMENT SYSTEM. Getting Started Guide

Introduction to Dreamweaver

How to Use the Text Editor in Blackboard

Basics of HTML (some repetition) Cascading Style Sheets (some repetition) Web Design

Introduction to Web Technologies

Further web design: using meta tags

darlingharbour.com Content Management System Tenant User Guide

Web Design for Programmers. Brian Hogan NAPCS Slides and content 2008 Brian P. Hogan Do not reproduce in any form without permission

4 Understanding. Web Applications IN THIS CHAPTER. 4.1 Understand Web page development. 4.2 Understand Microsoft ASP.NET Web application development

TUTORIAL 4 Building a Navigation Bar with Fireworks

About webpage creation

WebCT 4.x: HTML Editor

Content Management System

Maintaining a University website in the CMS

Transcription:

INFORMATICA GENERALE 2014/2015 LINGUAGGI DI MARKUP HTML cristina gena dipartimento di informatica cgena@di.unito.it http://www.di.unito.it/~cgena/ materiale e info sul corso http://www.di.unito.it/~cgena/teaching.html Fonte delle slides http://www.w3schools.com/html/default.asp

INTRO What is HTML? HTML is a markup language for describing web documents (web pages). HTML stands for Hyper Text Markup Language A markup language is a set of markup tags HTML documents are described by HTML tags Each HTML tag describes different document content 2

HTML FIRST EXAMPLE The DOCTYPE declaration defines the document type The text between <html> and </html> describes the web document The text between <body> and </body> describes the visible page content The text between <h1> and </h1> describes a heading The text between <p> and </p> describes paragraph 3

DOCTYPE The <!DOCTYPE> declaration helps the browser to display a web page correctly. There are many different documents on the web, and a browser can only display an HTML page correctly if it knows the HTML version and type. The doctype declaration is not case sensitive. All cases are acceptable: <!DOCTYPE html> <!DOCTYPE HTML> <!doctype html> <!Doctype Html> 4

HTML TAGS HTML tags are keywords (tag names) surrounded by angle brackets: <tagname>content</tagname> HTML tags normally come in pairs like <p> and </p> The first tag in a pair is the start tag, the second tag is the end tag The end tag is written like the start tag, but with a slash before the tag name Note:The start tag is often called the opening tag. The end tag is often called the closing tag. 5

HTML ELEMENTS HTML elements are written with a start tag, with an end tag, with the content in between The HTML element is everything from the start tag to the end tag: <p>my first HTML paragraph.</p> HTML elements with no content are called empty elements. <br> is an empty element without a closing tag (the <br> tag defines a line break). 6

WEB BROWSERS The purpose of a web browser (Chrome, IE, Firefox, Safari) is to read HTML documents and display them. The browser does not display the HTML tags, but uses them to determine how to display the document 7

WEB BROWSERS HTML Tip - How to View HTML Source Have you ever seen a Web page and wondered "Hey! How did they do that?" To find out, right-click in the page and select "View Page Source" (in Chrome) or "View Source" (in IE), or similar in another browser. This will open a window containing the HTML code of the page. 8

HTML VERSIONS october 2014 > HTML5 is the standard 9

WRITE HTML USING NOTEPAD OR TEXTEDIT Write HTML Using Notepad or TextEdit HTML can be edited by using a professional HTML editor like: Adobe Dreamweaver Microsoft Expression Web CoffeeCup HTML Editor Fraise Editor (for Mac users) However, for learning HTML we recommend a text editor like Notepad (PC) or TextEdit (Mac). We believe using a simple text editor is a good way to learn HTML. Follow the 4 steps below to create your first web page with Notepad. 10

EDITING STEPS Step 1: Open an Editor Step 2: Write Some HTML Step 3: Save the HTML Page Step 4: Open HTML Page in Your Browser 11

HTML DOCUMENTS All HTML documents must start with a type declaration: <!DOCTYPE html> The HTML document itself begins with <html> and ends with </html>. The visible part of the HTML document is between <body> and </body>. 12

HTML TIP: USE LOWERCASE TAGS HTML tags are not case sensitive: <P> means the same as <p>. The HTML5 standard does not require lowercase tags, but W3C recommends lowercase in HTML4, and demands lowercase for stricter document types like XHTML. 13

HTML ATTRIBUTES HTML elements can have attributes Attributes provide additional information about an element Attributes are always specified in the start tag Attributes come in name/value pairs like: name="value" The document language can be declared in the <html> tag. The language is declared in the lang attribute. Declaring a language is important for accessibility applications (screen readers) and search engines: 14

THE HTML <HEAD> ELEMENT The <head> element is a container for all the head elements. Elements inside <head> can include scripts, instruct the browser where to find style sheets, provide meta information, and more. The following tags can be added to the head section: <title>, <style>, <meta>, <link>, <script>, <noscript>, and <base>. 15

THE HTML <TITLE> ELEMENT The <title> tag defines the title of the document. The <title> element is required in all HTML/XHTML documents. The <title> element: defines a title in the browser toolbar provides a title for the page when it is added to favorites displays a title for the page in search engine results Example <!DOCTYPE html> <html> <head> <title>title of the document</title> </head> <body> The content of the document... </body> </html> 16

THE HTML <META> ELEMENT Metadata is data (information) about data. The <meta> tag provides metadata about the HTML document. Metadata will not be displayed on the page, but will be machine parsable. Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata. The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services. <meta> tags always go inside the <head> element. 17

<META> TAGS - EXAMPLES OF USE Define keywords for search engines: <meta name="keywords" content="html, CSS, XML, XHTML, JavaScript"> Define a description of your web page: <meta name="description" content="free Web tutorials on HTML and CSS"> Define the author of a page: <meta name="author" content="hege Refsnes"> Refresh document every 30 seconds: <meta http-equiv="refresh" content="30"> 18

HTML HEADINGS HTML headings are defined with the <h1> to <h6> tags: Example <h1>this is a heading</h1> <h2>this is a heading</h2> <h3>this is a heading</h3> <h4>this is a heading</h4> <h5>this is a heading</h5> <h6>this is a heading</h6> Headings Are Important Use HTML headings for headings only. Don't use headings to make text BIG or bold. Search engines use your headings to index the structure and content of your web pages. 19

HTML PARAGRAPHS HTML paragraphs are defined with the <p> tag: Example <p>this is a paragraph.</p> <p>this is another paragraph.</p> 20

HTML LINE BREAK A line break is marked up as follows: <br> Example To break lines<br>in a text,<br>use the br element. Empty HTML Elements HTML elements with no content are called empty elements. <br> is an empty element without a closing tag (the <br> tag defines a line break). Empty element can be "closed" in the opening tag like this: <br />. HTML5 does not require empty elements to be closed. But if you need stricter validation, and make your document readable by XML parsers, please close all HTML elements. 21

HTML HORIZONTAL RULES The <hr> tag creates a horizontal line in an HTML page. The hr element can be used to separate content: Example <p>the hr tag defines a horizontal rule:</p> <hr> <p>this is a paragraph.</p> <hr> <p>this is a paragraph.</p> <hr> <p>this is a paragraph.</p> 22

HTML FORMATTING ELEMENTS HTML also defines special elements, for defining text with a special meaning. HTML uses elements like <b> and <i> for formatting output, like bold or italic text. Formatting elements were designed to display special types of text: Bold text Important text Italic text Emphasized text Marked text Small text Deleted text Inserted text Subscripts Superscripts 23

HTML BOLD AND STRONG FORMATTING The HTML <b> element defines bold text, without any extra importance. Example <p>this text is normal.</p> <p><b>this text is bold</b>.</p> The HTML <strong> element defines strong text, with added semantic "strong" importance. Example <p>this text is normal.</p> <p><strong>this text is strong</strong>.</p> 24

HTML ITALIC AND EMPHASIZED FORMATTING The HTML <i> element defines italic text, without any extra importance. Example <p>this text is normal.</p> <p><i>this text is italic</i>.</p> The HTML <em> element defines emphasized text, with added semantic importance. Example <p>this text is normal.</p> <p><em>this text is emphasized</em>.</p> Note: Browsers display <strong> as <b>, and <em> as <i>. However, there is a difference in the meaning of these tags: <b> and <i> defines bold and italic text,but <strong> and <em> means that the text is "important". 25

HTML SMALL FORMATTING The HTML <small> element defines small text: Example <h2>html <small>small</small> Formatting</h2> 26

HTML MARKED & DELETED FORMATTING The HTML <mark> element defines marked or highlighted text: Example <h2>html <mark>marked</mark> Formatting</h2> The HTML <del> element defines deleted (removed) of text. Example E<p>My favorite color is <del>blue</del> red.</p> 27

HTML INSERTED FORMATTING The HTML <ins> element defines inserted (added) text, like in word revisions. PAY ATTENTION!!! Example <p>my favorite <ins>color</ins> is red.</p> 28

HTML COMMENTS Comment tags <!-- and --> are used to insert comments in HTML. Example <!-- This is a comment --> <p>this is a paragraph.</p> <!-- Remember to add more information here > Comments are also great for debugging HTML, because you can comment out HTML lines of code, one at a time, to search for errors: Example <!-- Do not display this at the moment <img border="0" src="pic_mountain.jpg" alt="mountain"> > 29

HTML IMAGES HTML images are defined with the <img> tag. The source file (src), alternative text (alt), and size (width and height) are provided as attributes: Example <img src="w3schools.jpg" alt="w3schools.com" width="104" height="142"> 30

HTML IMAGE ATTRIBUTES The alt attribute specifies an alternate text for the image, if it cannot be displayed. The value of the alt attribute should describe the image in words: <img src="html5.gif" alt="the official HTML5 Icon"> The alt attribute is required. A web page will not validate correctly without it. (http://validator.w3.org) Screen readers are software programs that can read what is displayed on a screen. Used on the web, screen readers can "reproduce" HTML as text-to-speech, sound icons, or braille output. Screen readers are used by people who are blind, visually impaired, or learning disabled. Note: Screen readers can read the alt attribute. 31

HTML IMAGE ATTRIBUTES Image Size - Width and Height The values are specified in pixels (without px after the value): <img src="html5.gif" alt="html5 Icon" width="128" height= 128"> You can also use the style attribute to specify the width and height of an image. The values are specified in pixels (use px after the value): <img src="html5.gif" alt="html5 Icon" style="width:128px;height:128px"> Both the width, the height, and the style attributes, are valid in the latest HTML5 standard. We suggest you use the style attribute. It prevents styles sheets from changing the default size of images: 32

HTML IMAGE STORAGE If not specified, the browser expects to find the image in the same folder as the web page. However, it is common on the web, to store images in a sub-folder, and refer to the folder in the image name: <img src="/images/html5.gif" alt="html5 Icon" style="width:128px;height:128px"> If a browser cannot find an image, it will display a broken link icon (http:// www.w3schools.com/html/tryit.asp?filename=tryhtml_images_wrong) Some web sites store their images on image servers. Actually, you can access images from any web address in the world: <img src="http://www.w3schools.com/images/w3schools_green.jpg"> 33

USING AN IMAGE AS A LINK It is common to use images as links: Example <a href= http://www.w3schools.com/html/ > <img src="smiley.gif" alt="html tutorial" style="width:42px;height:42px;border:0"> </a> 34

HTML LINKS HTML links are defined with the <a> tag: Link Syntax: <a href="url">link text</a> Example <a href= local.php">this is a local link</a> <a href="http://www.w3schools.com/html/">visit our HTML tutorial</a> 35

HTML LINKS - COLORS AND ICONS When you move the mouse cursor over a link, two things will normally happen: The mouse arrow will turn into a little hand The color of the link element will change By default, links will appear as this in all browsers: An unvisited link is underlined and blue A visited link is underlined and purple An active link is underlined and red You can change the defaults, using CSS styles 36