Title, meta, link, script. The title looks like: The tag defines the title of the document in the...

9
Head Elements: title, meta, link, script

Transcript of Title, meta, link, script. The title looks like: The tag defines the title of the document in the...

Page 1: Title, meta, link, script.  The title looks like:  The tag defines the title of the document in the browser toolbar.  It also: ◦ Provides a title for.

Head Elements:title, meta, link, script

Page 2: Title, meta, link, script.  The title looks like:  The tag defines the title of the document in the browser toolbar.  It also: ◦ Provides a title for.

The title looks like: <title></title> The <title> tag defines the title of the

document in the browser toolbar. It also:

◦ Provides a title for the page when it is added to favorites

◦ Displays a title for the page in search engine results

Head Elements: title

Source: http://www.w3schools.com/html/html_head.asp

Page 3: Title, meta, link, script.  The title looks like:  The tag defines the title of the document in the browser toolbar.  It also: ◦ Provides a title for.

<!DOCTYPE html><html><head><title>My Site</title></head>

<body>

</body>

</html>

Head Elements: title

Page 4: Title, meta, link, script.  The title looks like:  The tag defines the title of the document in the browser toolbar.  It also: ◦ Provides a title for.

The link looks like : <link> The <link> tag defines the relationship

between a document and an external resource.

It is mostly used to link to css style sheets.

Head Elements: link

Source: http://www.w3schools.com/html/html_head.asp

Page 5: Title, meta, link, script.  The title looks like:  The tag defines the title of the document in the browser toolbar.  It also: ◦ Provides a title for.

<!DOCTYPE html><html><head><link rel="stylesheet" type="text/css" href="mystyle.css"></head>

<body>

</body>

</html>

Head Elements: link

Page 6: Title, meta, link, script.  The title looks like:  The tag defines the title of the document in the browser toolbar.  It also: ◦ Provides a title for.

The meta looks like : <meta> The <meta> provides metadata about the HTML

document. Metadata will not be displayed on the page.

Meta elements are used to specify page description, keywords, author of the document, last modified, and other metadata.

The metadata can be used by browsers (how to display content or when to reload a page), search engines (keywords), or other web services.

Head Elements: meta

Source: http://www.w3schools.com/html/html_head.asp

Page 7: Title, meta, link, script.  The title looks like:  The tag defines the title of the document in the browser toolbar.  It also: ◦ Provides a title for.

<!DOCTYPE html><html><head><meta name="keywords" content=“Cupcakes, Cheesecakes, Brownies"></head>

<body>

</body>

</html>

Head Elements: meta

Page 8: Title, meta, link, script.  The title looks like:  The tag defines the title of the document in the browser toolbar.  It also: ◦ Provides a title for.

The script looks like: <script></script> The <script> tag is used to add JavaScript.

Head Elements: script

Source: http://www.w3schools.com/html/html_head.asp

Page 9: Title, meta, link, script.  The title looks like:  The tag defines the title of the document in the browser toolbar.  It also: ◦ Provides a title for.

<!DOCTYPE html><html><head><script type="text/JavaScript">function sayHello() { var alias = document.getElementById('name').value; var greeting = 'It is good to meet you ' + alias + '!'; document.getElementById('display').innerHTML = greeting;}</script></head><body>Please enter your name: <input type="text" id="name"><button type="button" onclick="sayHello()">Hello</button><div id="display"></div></body></html>

Head Elements: script