Presentation is loading. Please wait.

Presentation is loading. Please wait.

HTML Basics Text, Images, Tables, Forms. HTML Structure HTML is comprised of “elements” and “tags” – Begins with and ends with Elements (tags) are nested.

Similar presentations


Presentation on theme: "HTML Basics Text, Images, Tables, Forms. HTML Structure HTML is comprised of “elements” and “tags” – Begins with and ends with Elements (tags) are nested."— Presentation transcript:

1 HTML Basics Text, Images, Tables, Forms

2 HTML Structure HTML is comprised of “elements” and “tags” – Begins with and ends with Elements (tags) are nested one inside another: Tags have attributes: HTML describes structure using two main sections: and 2

3 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 3

4 First HTML Page 4 <html> My First HTML Page My First HTML Page This is some text... This is some text... </html> test.html

5 <html> My First HTML Page My First HTML Page This is some text... This is some text... </html> First HTML Page: Tags 5 Opening tag Closing tag An HTML element consists of an opening tag, a closing tag and the content inside.

6 <html> My First HTML Page My First HTML Page This is some text... This is some text... </html> First HTML Page: Header 6 HTML header

7 <html> My First HTML Page My First HTML Page This is some text... This is some text... </html> First HTML Page: Body 7 HTML body

8 Some Simple Tags Hyperlink Tags Image Tags Text formatting tags 8 <a href="http://www.telerik.com/" title="Telerik">Link to Telerik Web site title="Telerik">Link to Telerik Web site This text is emphasized. This text is emphasized. new line new line This one is more emphasized. This one is more emphasized.

9 Some Simple Tags – Example 9 <html><head> Simple Tags Demo Simple Tags Demo </head><body> <a href="http://www.telerik.com/" title= "Telerik site">This is a link. "Telerik site">This is a link. Bold and italic text. Bold and italic text.</body></html> some-tags.html

10 Some Simple Tags – Example (2) 10 <html><head> Simple Tags Demo Simple Tags Demo </head><body> <a href="http://www.telerik.com/" title= "Telerik site">This is a link. "Telerik site">This is a link. Bold and italic text. Bold and italic text.</body></html> some-tags.html

11 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 11 Attribute alt with value " logo "

12 Headings and Paragraphs Heading Tags (h1 – h6) Paragraph Tags Sections: div and span 12 This is my first paragraph This is my first paragraph This is my second paragraph This is my second paragraph Heading 1 Heading 1 Sub heading 2 Sub heading 2 Sub heading 3 Sub heading 3 This is a div This is a div

13 Headings and Paragraphs – Example 13 <html> Headings and paragraphs Headings and paragraphs Heading 1 Heading 1 Sub heading 2 Sub heading 2 Sub heading 3 Sub heading 3 This is my first paragraph This is my first paragraph This is my second paragraph This is my second paragraph This is a div This is a div </html> headings.html

14 <html> Headings and paragraphs Headings and paragraphs Heading 1 Heading 1 Sub heading 2 Sub heading 2 Sub heading 3 Sub heading 3 This is my first paragraph This is my first paragraph This is my second paragraph This is my second paragraph This is a div This is a div </html> Headings and Paragraphs – Example (2) 14 headings.html


Download ppt "HTML Basics Text, Images, Tables, Forms. HTML Structure HTML is comprised of “elements” and “tags” – Begins with and ends with Elements (tags) are nested."

Similar presentations


Ads by Google