15
HTML STRUCTURE & SYNTAX

HTML STRUCTURE & SYNTAX. This presentation introduces the following: Doctype declaration HTML Tags, Elements and Attributes Sections of a Web

Embed Size (px)

Citation preview

Page 1: HTML STRUCTURE & SYNTAX.  This presentation introduces the following:  Doctype declaration  HTML Tags, Elements and Attributes  Sections of a Web

HTML STRUCTURE & SYNTAX

Page 2: HTML STRUCTURE & SYNTAX.  This presentation introduces the following:  Doctype declaration  HTML Tags, Elements and Attributes  Sections of a Web

This presentation introduces the following:Doctype declarationHTML Tags, Elements and AttributesSections of a Web documentRole of Web browserText editorSaving and previewing files

INTRODUCTION

Page 3: HTML STRUCTURE & SYNTAX.  This presentation introduces the following:  Doctype declaration  HTML Tags, Elements and Attributes  Sections of a Web

HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG).

WORLD WIDE WEB CONSORTIUM

Page 4: HTML STRUCTURE & SYNTAX.  This presentation introduces the following:  Doctype declaration  HTML Tags, Elements and Attributes  Sections of a Web

In HTML5 there is only one <!doctype> declaration, and it is very simple: <!DOCTYPE html>

The doctype is not an HTML tag. It is a declaration. It tells the browser the version of HTML.

DOCTYPE DECLARATION

Page 5: HTML STRUCTURE & SYNTAX.  This presentation introduces the following:  Doctype declaration  HTML Tags, Elements and Attributes  Sections of a Web

HTML stands for Hyper Text Markup Language

HTML is a markup languageA markup language is a set of

markup tagsThe tags describe document

contentHTML documents

contain HTML tags and plain text

HTML documents are also called web pages

WHAT IS HTML?

Page 6: HTML STRUCTURE & SYNTAX.  This presentation introduces the following:  Doctype declaration  HTML Tags, Elements and Attributes  Sections of a Web

HTML tags are keywords (tag names) surrounded by angle brackets like <html>

HTML tags normally come in pairs like <b> and </b>

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, with a forward slash before the tag name

Start and end tags are also called opening tags and closing tags

WHAT ARE HTML TAGS?

Page 7: HTML STRUCTURE & SYNTAX.  This presentation introduces the following:  Doctype declaration  HTML Tags, Elements and Attributes  Sections of a Web

An HTML element is everything between the start tag and the end tag, including the tags:

HTML Element:<p>This is a paragraph.</p>

WHAT IS AN HTML ELEMENT?

Page 8: HTML STRUCTURE & SYNTAX.  This presentation introduces the following:  Doctype declaration  HTML Tags, Elements and Attributes  Sections of a Web

Attributes provide additional information about an element.

WHAT IS AN ATTRIBUTE?

Page 9: HTML STRUCTURE & SYNTAX.  This presentation introduces the following:  Doctype declaration  HTML Tags, Elements and Attributes  Sections of a Web

<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Title of the document</title></head>

<body>Content of the document......</body>

</html>

MINIMUM HTML DOCUMENT

Page 10: HTML STRUCTURE & SYNTAX.  This presentation introduces the following:  Doctype declaration  HTML Tags, Elements and Attributes  Sections of a Web

The <head> section contains information about your page.

The <body> section contains the visible content of your page.

TWO SECTIONS IN A WEB PAGE

Page 11: HTML STRUCTURE & SYNTAX.  This presentation introduces the following:  Doctype declaration  HTML Tags, Elements and Attributes  Sections of a Web

The purpose of a web browser (such as Google Chrome, Internet Explorer, Firefox, Safari) is to read HTML documents and display them as web pages.

The browser does not display the HTML tags, but uses the tags to determine how the content of the HTML page is to be presented/displayed to the user.

WEB BROWSER

Page 12: HTML STRUCTURE & SYNTAX.  This presentation introduces the following:  Doctype declaration  HTML Tags, Elements and Attributes  Sections of a Web

A simple text editor can be used for coding a Web page.

Using a text editor is a good way to learn coding.

Web editors are also used for coding.

WRITING HTML CODE

Page 13: HTML STRUCTURE & SYNTAX.  This presentation introduces the following:  Doctype declaration  HTML Tags, Elements and Attributes  Sections of a Web

When you save an HTML file, you can use either the .htm or the .html file extension. There is no difference, it is entirely up to you.

Save the file in a folder that is easy to remember

Keep filenames short and descriptive.

Avoid using spaces in filenames.

SAVING A FILE

Page 14: HTML STRUCTURE & SYNTAX.  This presentation introduces the following:  Doctype declaration  HTML Tags, Elements and Attributes  Sections of a Web

Open the HTML page in a Web browser to preview it.

You should view your page in multiple Web browsers. Most likely it will not look exactly the same in every Web browser.

PREVIEWING THE FILE

Page 15: HTML STRUCTURE & SYNTAX.  This presentation introduces the following:  Doctype declaration  HTML Tags, Elements and Attributes  Sections of a Web

Learn some codes.

NEXT STEP…..


<!doctype html><html><head><script type=