HTML tags Skills adding HTML tags text editor

  • Slides: 26
Download presentation
HTML tags Skills: adding HTML tags, text editor IT concepts: plain text, computer components

HTML tags Skills: adding HTML tags, text editor IT concepts: plain text, computer components – storage versus memory, separation of content and format This work is licensed under a Creative Commons Attribution-Noncommercial. Share Alike 3. 0 License.

HTML tags • • What is HTML? The Notepad text editor Create an HTML

HTML tags • • What is HTML? The Notepad text editor Create an HTML document Tim Berners-Lee

What is HTML? Hypertext Markup Language HTML tags are added to Web documents to

What is HTML? Hypertext Markup Language HTML tags are added to Web documents to control their layout and appearance. Hypertext is non-linear – the reader can follow links, jumping from page to page. Linear text is read from start to finish. Hypertext systems predate the Web, but the Web caught on.

Same content, different layout and appearance

Same content, different layout and appearance

There are tools for creating Web sites that generate HTML for you – why

There are tools for creating Web sites that generate HTML for you – why learn HTML? • Every user – To be able to modify pages – for example adding a feature to a blog – To understand how the technology works in order to feel empowered and in control • Developers – To be able to write programs that generate HTML We will not use an HTML generating tool, we will compose HTML documents using a plain text editor.

HTML tags • • What is HTML? The Notepad text editor Create an HTML

HTML tags • • What is HTML? The Notepad text editor Create an HTML document Tim Berners-Lee

The Notepad text editor • Notepad is included with Windows. • Notepad is in

The Notepad text editor • Notepad is included with Windows. • Notepad is in the Accessories program group. • Start > All programs > Accessories > Notepad

Notepad versus Word Notepad – a plain text editor Word – a full word

Notepad versus Word Notepad – a plain text editor Word – a full word processor

Notepad versus Word

Notepad versus Word

An ASCII example My first name, Larry, would be encoded as follows: L 1001100

An ASCII example My first name, Larry, would be encoded as follows: L 1001100 a 1100001 r 1110010 y 1111001 It requires only five bytes of memory or storage: 01001100001 01110010 01111001 Only the character codes are recorded.

Extra information in a. doc file This requires more memory or storage.

Extra information in a. doc file This requires more memory or storage.

HTML tags • • What is HTML? The Notepad text editor Create an HTML

HTML tags • • What is HTML? The Notepad text editor Create an HTML document Tim Berners-Lee

Before starting, turn off extension hiding start > computer > tools > folder options.

Before starting, turn off extension hiding start > computer > tools > folder options. . . > view Uncheck You only have to do this one time.

Type in the text, then …

Type in the text, then …

Add the basic HTML tags …

Add the basic HTML tags …

Save the file on your hard drive

Save the file on your hard drive

Naming your HTML file Use the extension htm or html. Be careful to select

Naming your HTML file Use the extension htm or html. Be careful to select All Files as the type.

Check to see the file was saved in the directory you selected Be sure

Check to see the file was saved in the directory you selected Be sure the file has the extension. htm, not. txt.

Display the page using a Web client View the page by double clicking on

Display the page using a Web client View the page by double clicking on the file name or using the File > Open command in the Web client. But, I do not like the formatting – I want to add a heading and a paragraph break, so I must add some more HTML tags.

Add the <h 2> … </h 2> and <p> tags

Add the <h 2> … </h 2> and <p> tags

Save it on the hard drive then refresh using the Web client

Save it on the hard drive then refresh using the Web client

Note that it re-wraps the text if the window is re-sized

Note that it re-wraps the text if the window is re-sized

Notepad and a Web client side by side Simple debugging -- change the HTML,

Notepad and a Web client side by side Simple debugging -- change the HTML, save it, and refresh the client.

HTML tags • • What is HTML? The Notepad text editor Create an HTML

HTML tags • • What is HTML? The Notepad text editor Create an HTML document Tim Berners-Lee

Tim Berners-Lee invented HTML Tim Berners-Lee was knighted by Queen Elizabeth for his invention

Tim Berners-Lee invented HTML Tim Berners-Lee was knighted by Queen Elizabeth for his invention of the World Wide Web. He is shown here, along with the first picture posted on the Web and a screen shot from an early version of his Web browser.

Reference links • A dozen tags to get started • HTML tutorials with executable

Reference links • A dozen tags to get started • HTML tutorials with executable examples • The original ASCII code