XHTML HyperText Markup Language Instructs a browser how to “render”/display/format text.

Slides:



Advertisements
Similar presentations
Table, List, Blocks, Inline Style
Advertisements

HTML popo.
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.
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
HTML: HyperText Markup Language Hello World Welcome to the world!
HTML popo.
Presenter: James Huang Date: Sept. 26,  Introduction  Basics  Lists  Links  Forms  CSS 2.
INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
Part 3 Introduction to CSS. CSS Text Text Styles h1 {color: green} // rgb(0,255,0), #00ff00 h2{letter-spacing: 0.5cm} // 2px h3 {text-align: right} //
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
MR.Mohammed Sharaf al Shareef
HTML and XHTML Controlling the Display Of Web Content.
Markup Languages Controlling the Display Of Web Content.
XHTML and CSS Overview. Hypertext Markup Language A set of markup tags and associated syntax rules Unlike a programming language, you cannot describe.
Database-Driven Web Sites, Second Edition1 Chapter 2 INTRODUCTION TO HTML.
More HTML Chapter 4. 2 Nesting Tags How do you write the following in HTML? The wrong way: This is really, REALLY fun ! Tags must be correctly nested.
HTML BASIC
HTML: PART ONE. Creating an HTML Document  It is a good idea to plan out a web page before you start coding  Draw a planning sketch or create a sample.
3.1 Cascading Style Sheets. Motto Fashions fade, style is eternal. —Yves Saint Laurent.
HTML. Creating a Table Attributes: border: indicates the border type of the table Value: 0 (no border), 1, 2, etc. cols: indicates the number of columns.
Computer Sciences Department
CpSc 462/662: Database Management Systems (DBMS) (TEXNH Approach) HTML Basics James Wang.
CS105 Introduction to Computer Concepts HTML
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
HTML 4.0 History and Application By: Marc Mayzes.
_ HTML, XHTML & CSS Sami Niemelä | Module 1: Introduction to digital media: Day 02.
1 Cascading Style Sheets (CSS) Part 2. 2 The Sources of Style Sheets.
Chapter 4: Hypertext Markup Language Primer TECH Prof. Jeff Cheng.
 HTML stands for Hyper Text Mark-up Language. The coding language used to create documents for the World Wide Web  HTML is composed of tags. HTML tags.
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.
1 CSC 121 Computers and Scientific Thinking David Reed Creighton University HTML and Web Pages.
CHAPTER 1 HTML & HTML5 I อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
CS105 INTRODUCTION TO COMPUTER CONCEPTS HTML Instructor: Cuong (Charlie) Pham.
XP 2 HTML Tutorial 1: Developing a Basic Web Page.
Introduction HTML (Hypertext Markup Language) is used to create document on the World Wide Web. HTML is not a programming language, it is a markup language.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
Introduction to HTML Xiangming Mu 9/23/ Learning Objectives Understand basic HTML tags and their attributes Learn to create a simple HTML page.
HTML – Organizing Page Content. HTML Images img tag Required attribute: src
1 Web Application Programming Presented by: Mehwish Shafiq.
HTML – Organizing Page Content. HTML Images img tag Required attribute: src
Cascading Style Sheets Eugenia Fernandez IUPUI. CSS Purpose CSS allow you to specify the style in which your XML elements are displayed. CSS were originally.
CIS234A Lecture 5 Instructor Greg D’Andrea. Font Styles Review Font-Family: generic family, font family Font-Size: em, pt, px, %, mm, cm, in Font-Style:
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
WEEK -1 ACM 262 ACM 262 Course Notes. HTML What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML.
What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Introduction to Web Authoring Ellen Cushman /wra210.htm Class mtg. #2.
`. 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
XP 2 HTML Tutorial 1: Developing a Basic Web Page.
1999, COMPUTER SCIENCE, BUU Introduction to HTML Seree Chinodom
CSS Cascading Style Sheets *referenced from
INT222 – Internet Fundamentals
1 HTML. 2 Full forms WWW – world Wide Web HTTP – Hyper Text Transfer Protocol HTML – Hyper Text Markup Language.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
Chapter 1: Intro to HTML Section 1: HTML Structure Presentation Section 2: Layout of an HTML File Section 3: Working with Lists & Tables Section 4: HTML.
HTML for web designing short course. What is an HTML File? HTML stands for Hyper Text Markup Language An HTML file must have an htm or html file extension.
HTML AN INTRODUCTION TO WEB PAGE PROGRAMMING. INTRODUCTION TO HTML With HTML you can create your own Web site. HTML stands for Hyper Text Markup Language.
XHTML HyperText Markup Language Instructs a browser how to “render”/display/format text.
Basic HTML5 Elements CPSC Spacing Adjacent spaces, tabs, newlines in the input reduce to a single space in the output The following will not display.
CSS for Styling By Jinzhu Gao.
CSS Layouts CH 13.
HTML5 HyperText Markup Language
HTML: HyperText Markup Language
Cascading Style Sheets
Cascading Style Sheets
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

XHTML HyperText Markup Language Instructs a browser how to “render”/display/format text

XHTML Syntax The basic building block is the “element” An element is composed of a “start tag”, some text (content) and an “end tag” E.g. hello world Start tag End tag content

Start Tag “<“ Name of the tag 0 or more “attributes” “>” E.g. – name attributes

Content May be plain text May include other elements E.g. – Hello world – She wore a very large hat

Attributes Name/value pairs Syntax: name=“value” E.g. – class=“defn” – id=“abc”

End tag “</” Name of the corresponding start tag “>” E.g. –

XHTML vs. HTML XML stands for eXtensible Markup Language XML is a family of similar languages XHTML is a reformulation of HTML in XML syntax XHTML is the preferred language for new Web documents

Case sensitivity XHTML is case sensitive; tag and attribute names must be given in lower case E.g. – not

End tags In XHTML, end tags are required Applies particularly to and tags E.g. – … … not … … …

Empty elements Empty elements must use the XML convention for empty elements E.g. not

Attribute values Attribute values must be quoted E.g. – not

Html element Every document consists of a single html element: [link]greendreams.htmllink Green Dreams Green dreams sleep peacefully.

element only inside a element “name” attribute specifies a property name “content” attribute specifies a property value typical properties: author, keywords, description

Spacing Adjacent spaces, tabs, newlines in the input reduce to a single space in the output linkspacing.htmllink The following will not display what you expect: ProvinceSales Tax Rate Ontario8% Alberta0% British Columbia7%

Paragraphs The spacing rules apply to newlines between paragraphs: linkbad_para.htmlink This is paragraph 1. It was a quiet day for all the quitters. Now is the time for all the good men to go to aid of the party.The quick brown fox jumps over the lazy dog. This is paragraph 2. It was a quiet day for all the quitters. Now is the time for all the good men to go to aid of the party.The quick brown fox jumps over the lazy dog.

element Enclose logical paragraphs inside a … element linkgood_para.htmllink This is paragraph 1. It was a quiet day for all the quitters. Now is the time for all the good men to go to aid of the party.The quick brown fox jumps over the lazy dog. This is paragraph 2. It was a quiet day for all the quitters. Now is the time for all the good men to go to aid of the party.The quick brown fox jumps over the lazy dog.

Header elements Use the to elements to delineate sections of a document linkheader.htmllink Heading 1 Heading 2 Heading 3 Heading 4

Logical Highlighting … - emphasis (usually italics)‏ … - stronger emphasis (usually boldface)‏ linklinklogical html

Physical Highlighting … - italics … - bold … - subscript … - superscript linklinkphysical.html

Special Characters << >> && "“

Misc. elements Comments: Horizontal rule:

Images Inserted using element Src attribute specifies file containing the image to insert Alt attribute specifies the text to display when the browser can’t render the image E.g. linkbill1.htmllink Speedy Bill

Resizing Images Use the “width” and “height” attributes to specify the desired size linkbill2.htmllink linkbill3.htmllink

Links Links to other documents are implemented with the … or “anchor” element Href attribute specifies the document to link to E.g linklink.htmllink See Bill drive fast !

Block Level Elements Lists Tables Framesets

Layout (Block v. Inline)‏ inline elements flow together one after another; a new line is started only if the next element will not fit on the current line block level elements almost always start on a new line

Lists (unordered)‏ Produces a bulleted list: … Each item in the list is a … element

Lists (ordered)‏ Produces a numbered list: … The browser numbers the items automatically Each item in the list is … element listlist1.html list

Tables Creates a rectangular array of cells: … The “border” attribute specifies the width, in pixels, of the border around the table The “cellspacing” attribute specifies the amount of space, in pixels between adjacent cells The “cellpadding” attribute specifies the amount of space, in pixels between a cell and its own contents

Rows and Cells A “table” element contains one or more rows: … The first “tr” element usually contains one or more heading cells: … The remaing row elements are composed of one or more regular cells: … linktable1.html link

Cell Spanning By default all cells are the same size and shape The “rowspan” attribute allows a cell to cross two or more rows The “colspan” attribute allows a cell to cross two or more columns linktable2.htmllink

Definition Lists … definition list – … term being defined – … definition linkdefinition_list.htmllink Dweeb young excitable person who may mature into a Nerd or Geek Hacker a clever programmer Nerd technically bright but socially inept person

Framesets Used to display 2 or more entire web pages within a single window … Rows attribute – the number and style of rows to divide the window into Cols attribute – the number and style of columns to divide the window into

Frame Identifies the HTML document to place inside a frame Src attribute identifies the HTML file to display in the frame Name attribute names the frame so that it can be targetted by an anchor (link)‏

Frameset Example

Links (Anchors and frames)‏ To have a link in one frame change the file in another frame, use the “target” attribute of the “img” tag E.g Image 1

Cascading Style Sheets Separates content from presentation Used to globally alter the presentation of elements in a document E.g definition lists linkdefinition_list.htmllink –With font elements linkdl_with_font.htmllink

CSS Syntax Styles are defined within a … element within the … element of the document E.g. dt { color: red }

Syntax dt { color: red } selector property name value link dl_with_css

Selector name of an element,, dt {...} name of a class.pastoral {...} name of an ID attribute h1#main_section {...}

Common Properties Amount of space to leave inside the element before its content to the left padding-left Amount of space to leave vertically before element margin-top Normal, italic, or obliquefont-style Normal or boldfont-weight background-color Foreground colour color DescriptionName

Length units Relative em (ems, the height of the element's font) ex (x-height, the height of the letter "x") px (pixels, relative to the canvas resolution) Absolute in (inches; 1in=2.54cm) cm (centimeters; 1cm=10mm) mm (millimeters) pt (points; 1pt=1/72in) pc (picas; 1pc=12pt)

Linked Style Sheets element inside the element

Colours 12 bit RGB triplee.g.#47B 24 bit RGB triplee.g#F7342B name: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow

Other considerations For filenames, stick to lowercase, numbers and underscores ‘_’ Use the proper extension: –.html for HTML –.gif,.jpg for images ‘src’ and ‘href’ attributes are relative to the current document