HTML, Text, Images, Tables

Slides:



Advertisements
Similar presentations
HTML, Text, Images, Tables
Advertisements

HTML, Text, Images, Tables, Forms Svetlin Nakov Telerik Corporation
F DIGITAL MEDIA: COMMUNICATION AND DESIGN INTRODUCTION TO XML AND XHTML.
HTML, Text, Images, Tables, Forms Svetlin Nakov Telerik Corporation
Introduction to HTML academy.zariba.com 1. Lecture Content 1.What is HTML? 2.The HTML Tag 3.Most popular HTML tags 2.
HTML Hyper Text Markup Language It is used for describing web documents or web pages. A markup language is set of markup tags. HTML documents are described.
Chapter 1 XHTML: Part I The Web Warrior Guide to Web Design Technologies.
>> Introduction to HTML: Tags. Hyper - is the opposite of linear Text – words / sentences / paragraphs Mark-up – Marking the text Language – It is a language.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
HTML: Hyptertext Markup Language Doman’s Sections.
HTML 5 Overview Document Structure, Basic Tags, Common Elements SoftUni Team Technical Trainers Software University
The past, the present, the future Learning & Development Team Telerik Software Academy.
HTML A brief introduction HTML1. HTML, what is? HTML is a markup language for describing web documents (web pages). HTML stands for Hyper Text Markup.
HTML HYPER TEXT MARKUP LANGUAGE. INTRODUCTION Normal text” surrounded by bracketed tags that tell browsers how to display web pages Pages end with “.htm”
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
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.
Presented By Presented By Tanveera Akhter Class:CA 2 nd year Dated:12/12/3456 Dept of Comp. Science.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 1 Using HTML to Create Web Pages.
HTML Basics Text, Images, Tables, Forms. HTML Structure HTML is comprised of “elements” and “tags” – Begins with and ends with Elements (tags) are nested.
Week 1: Introduction to HTML and Web Design
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
What is XHTML? XHTML stands for Extensible Hypertext Markup Language
LECTURE 1 (ETCS-308) Subject teacher : Ms. Gunjan Beniwal
INTRO TO WEB DEVELOPMENT html
HTML, Text, Images, Tables
How the Web Works? WWW use classical client / server architecture
LECTURE 2 (ETCS-308) Subject teacher : Ms. Gunjan Beniwal
Web Basics: HTML/CSS/JavaScript What are they?
HTML Basics.
HTML basics
HyperText Markup Language
Web Design and Development
Building Blocks of a Web Page HTML, HTML 5, CSS & XHTML
HTML.
Coding, Testing and Valdating a Web Page
INTRODUCTION TO HTML AND CSS
XHTML Basics.
What is XHTML?.
Computer Concepts I and II Sue Norris
Basic HTML/xHTML.
Chapter 1: Introduction to XHTML (part 1)
Web Programming– UFCFB Lecture 6
HTML- Text, Hyperlink, Images
XHTML Basics.
XHTML
XHTML Basics.
HTML A brief introduction HTML.
Basic HTML and Embed Codes
Introduction to HTML- Basics
INTRODUCTION TO HTML AND CSS
Introduction to HTML5.
LESSON 1 Module 2: XHTML Basics Basic XHTML.
XHTML Basics.
Creating Web Pages with HTML 5
Basic HTML Workshop.
CIS 133 mashup Javascript, jQuery and XML
CS3220 Web and Internet Programming HTML and XML Basics
Creating a Basic Web Page
XHTML Basics.
XHTML 7-May-19.
AN INTRODUCTION BY FAITH BRENNER
Lesson 2: HTML5 Coding.
XHTML 29-May-19.
محمد احمدی نیا XHTML محمد احمدی نیا
Creating your website and learning HTML
Web Programming and Design
Web Design & Development
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

HTML, Text, Images, Tables HTML Basics HTML, Text, Images, Tables Nikolay Kostov Telerik Corporation www.telerik.com

Table of Contents Introduction to HTML HTML in Details How the Web Works? What is a Web Page? My First HTML Page Basic Tags: Hyperlinks, Images, Formatting Headings and Paragraphs HTML in Details The <!DOCTYPE> Declaration The <head> Section: Title, Meta, Script, Style

Table of Contents (2) HTML in Details The <body> Section Text Styling and Formatting Tags Hyperlinks: <a>, Hyperlinks and Sections Images: <img> Lists: <ol>, <ul> and <dl> The <div> and <span> elements HTML Tables HTML Forms

How the Web Works? WWW use classical client / server architecture * 07/16/96 How the Web Works? WWW use classical client / server architecture HTTP is text-based request-response protocol HTTP Page request HTTP Server response Server running Web Server Software (IIS, Apache, etc.) Client running a Web Browser (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

What is a Web Page? Web pages are text files containing HTML * 07/16/96 What is a Web Page? Web pages are text files containing HTML HTML – Hyper Text Markup Language A notation for describing document structure (semantic markup) formatting (presentation markup) Looks (looked?) like: A Microsoft Word document The markup tags provide information about the page content structure (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

* 07/16/96 Creating HTML Pages An HTML file must have an .htm or .html file extension HTML files can be created with text editors: NotePad, NotePad ++, PSPad Or HTML editors (WYSIWYG Editors): Microsoft FrontPage Macromedia Dreamweaver Netscape Composer Microsoft Word Visual Studio (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

Text, Images, Tables, Forms HTML Basics Text, Images, Tables, Forms

HTML Structure HTML is comprised of “elements” and “tags” * 07/16/96 HTML Structure HTML is comprised of “elements” and “tags” Begins with <html> and ends with </html> Elements (tags) are nested one inside another: Tags have attributes: HTML describes structure using two main sections: <head> and <body> <html> <head></head> <body></body> </html> <img src="logo.jpg" alt="logo" /> (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

* 07/16/96 HTML Code Formatting The HTML source code should be formatted to increase readability and facilitate debugging. Every block element should start on a new line. Every nested (block) element should be indented. Browsers ignore multiple whitespaces in the page source, so formatting is harmless. For performance reasons, formatting can be sacrificed (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

First HTML Page test.html <!DOCTYPE HTML> <html> * 07/16/96 First HTML Page test.html <!DOCTYPE HTML> <html> <head> <title>My First HTML Page</title> </head> <body> <p>This is some text...</p> </body> </html> (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

First HTML Page: Tags Opening tag Closing tag <!DOCTYPE HTML> * 07/16/96 First HTML Page: Tags <!DOCTYPE HTML> <html> <head> <title>My First HTML Page</title> </head> <body> <p>This is some text...</p> </body> </html> Opening tag Closing tag An HTML element consists of an opening tag, a closing tag and the content inside. (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

First HTML Page: Header * 07/16/96 First HTML Page: Header HTML header <!DOCTYPE HTML> <html> <head> <title>My First HTML Page</title> </head> <body> <p>This is some text...</p> </body> </html> (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

First HTML Page: Body HTML body <!DOCTYPE HTML> <html> * 07/16/96 First HTML Page: Body <!DOCTYPE HTML> <html> <head> <title>My First HTML Page</title> </head> <body> <p>This is some text...</p> </body> </html> HTML body (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

Some Simple Tags Hyperlink Tags Image Tags Text formatting tags * 07/16/96 Some Simple Tags Hyperlink Tags Image Tags Text formatting tags <a href="http://www.telerik.com/" title="Telerik">Link to Telerik Web site</a> <img src="logo.gif" alt="logo" /> This text is <em>emphasized.</em> <br />new line<br /> This one is <strong>more emphasized.</strong> (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

Some Simple Tags – Example * 07/16/96 Some Simple Tags – Example some-tags.html <!DOCTYPE HTML> <html> <head> <title>Simple Tags Demo</title> </head> <body> <a href="http://www.telerik.com/" title= "Telerik site">This is a link.</a> <br /> <img src="logo.gif" alt="logo" /> <strong>Bold</strong> and <em>italic</em> text. </body> </html> (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

Some Simple Tags – Example (2) * 07/16/96 Some Simple Tags – Example (2) some-tags.html <!DOCTYPE HTML> <html> <head> <title>Simple Tags Demo</title> </head> <body> <a href="http://www.telerik.com/" title= "Telerik site">This is a link.</a> <br /> <img src="logo.gif" alt="logo" /> <strong>Bold</strong> and <em>italic</em> text. </body> </html> (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

Attribute alt with value "logo" Tags Attributes Tags can have attributes Attributes specify properties and behavior Example: Few attributes can apply to every element: id, style, class, title The id is unique in the document Content of title attribute is displayed as hint when the element is hovered with the mouse Some elements have obligatory attributes Attribute alt with value "logo" <img src="logo.gif" alt="logo" />

Headings and Paragraphs * 07/16/96 Headings and Paragraphs Heading Tags (h1 – h6) Paragraph Tags Sections: div and span <h1>Heading 1</h1> <h2>Sub heading 2</h2> <h3>Sub heading 3</h3> <p>This is my first paragraph</p> <p>This is my second paragraph</p> <div style="background: skyblue;"> This is a div</div> (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

Headings and Paragraphs – Example headings.html <!DOCTYPE HTML> <html> <head><title>Headings and paragraphs</title></head> <body> <h1>Heading 1</h1> <h2>Sub heading 2</h2> <h3>Sub heading 3</h3> <p>This is my first paragraph</p> <p>This is my second paragraph</p> <div style="background:skyblue"> This is a div</div> </body> </html>

Headings and Paragraphs – Example (2) headings.html <!DOCTYPE HTML> <html> <head><title>Headings and paragraphs</title></head> <body> <h1>Heading 1</h1> <h2>Sub heading 2</h2> <h3>Sub heading 3</h3> <p>This is my first paragraph</p> <p>This is my second paragraph</p> <div style="background:skyblue"> This is a div</div> </body> </html>

* HTML Document Structure in Depth 07/16/96 Introduction to HTML HTML Document Structure in Depth (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

Preface It is important to have the correct vision and attitude towards HTML HTML is only about structure, not appearance Browsers tolerate invalid HTML code and parse errors – you should not.

The <!DOCTYPE> Declaration * 07/16/96 The <!DOCTYPE> Declaration HTML documents must start with a document type definition (DTD) It tells web browsers what type is the served code Possible versions: HTML 4.01, XHTML 1.0 (Transitional or Strict), XHTML 1.1, HTML 5 Example: See http://w3.org/QA/2002/04/valid-dtd-list.html for a list of possible doctypes <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

HTML vs. XHTML XHTML is more strict than HTML Tags and attribute names must be in lowercase All tags must be closed (<br/>, <img/>) while HTML allows <br> and <img> and implies missing closing tags (<p>par1 <p>par2) XHTML allows only one root <html> element (HTML allows more than one)

XHTML vs. HTML (2) Many element attributes are deprecated in XHTML, most are moved to CSS Attribute minimization is forbidden, e.g. Note: Web browsers load XHTML faster than HTML and valid code faster than invalid! <input type="checkbox" checked> <input type="checkbox" checked="checked" />

The <head> Section * 07/16/96 The <head> Section Contains information that doesn’t show directly on the viewable page Starts after the <!doctype> declaration Begins with <head> and ends with </head> Contains mandatory single <title> tag Can contain some other tags, e.g. <meta> <script> <style> <!–- comments --> (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

<head> Section: <title> tag * 07/16/96 <head> Section: <title> tag Title should be placed between <head> and </head> tags Used to specify a title in the window title bar Search engines and people rely on titles <title>Telerik Academy – Winter Season 2009/2010 </title> (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

<head> Section: <meta> * 07/16/96 <head> Section: <meta> Meta tags additionally describe the content contained within the page <meta name="description" content="HTML tutorial" /> <meta name="keywords" content="html, web design, styles" /> <meta name="author" content="Chris Brewer" /> <meta http-equiv="refresh" content="5; url=http://www.telerik.com" /> (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

<head> Section: <script> * 07/16/96 <head> Section: <script> The <script> element is used to embed scripts into an HTML document Script are executed in the client's Web browser Scripts can live in the <head> and in the <body> sections Supported client-side scripting languages: JavaScript (it is not Java!) VBScript JScript (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

The <script> Tag – Example scripts-example.html <!DOCTYPE HTML> <html> <head> <title>JavaScript Example</title> <script type="text/javascript"> function sayHello() { document.write("<p>Hello World!<\/p>"); } </script> </head> <body> <script type= "text/javascript"> sayHello(); </body> </html>

<head> Section: <style> * 07/16/96 <head> Section: <style> The <style> element embeds formatting information (CSS styles) into an HTML page style-example.html <html> <head> <style type="text/css"> p { font-size: 12pt; line-height: 12pt; } p:first-letter { font-size: 200%; } span { text-transform: uppercase; } </style> </head> <body> <p>Styles demo.<br /> <span>Test uppercase</span>. </p> </body> </html> (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

Comments: <!-- --> Tag * 07/16/96 Comments: <!-- --> Tag Comments can exist anywhere between the <html></html> tags Comments start with <!-- and end with --> <!–- Telerik Logo (a JPG file) --> <img src="logo.jpg" alt=“Telerik Logo"> <!–- Hyperlink to the web site --> <a href="http://telerik.com/">Telerik</a> <!–- Show the news table --> <table class="newstable"> ... (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

<body> Section: Introduction * 07/16/96 <body> Section: Introduction The <body> section describes the viewable portion of the page Starts after the <head> </head> section Begins with <body> and ends with </body> <html> <head><title>Test page</title></head> <body> <!-- This is the Web page body --> </body> </html> (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

* 07/16/96 Text Formatting Text formatting tags modify the text between the opening tag and the closing tag Ex. <b>Hello</b> makes “Hello” bold <b></b> bold <i></i> italicized <u></u> underlined <sup></sup> Samplesuperscript <sub></sub> Samplesubscript <strong></strong> strong <em></em> emphasized <pre></pre> Preformatted text <blockquote></blockquote> Quoted text block <del></del> Deleted text – strike through 35 (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

Text Formatting – Example * 07/16/96 Text Formatting – Example text-formatting.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Page Title</title> </head> <body> <h1>Notice</h1> <p>This is a <em>sample</em> Web page.</p> <p><pre>Next paragraph: preformatted.</pre></p> <h2>More Info</h2> <p>Specifically, we’re using XHMTL 1.0 transitional.<br /> Next line.</p> </body> </html> (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*

Text Formatting – Example (2) * 07/16/96 Text Formatting – Example (2) text-formatting.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Page Title</title> </head> <body> <h1>Notice</h1> <p>This is a <em>sample</em> Web page.</p> <p><pre>Next paragraph: preformatted.</pre></p> <h2>More Info</h2> <p>Specifically, we’re using XHMTL 1.0 transitional.<br /> Next line.</p> </body> </html> (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.*