top of page

How To Build A Website: Part V— The <meta> and <link> tags; Headers And Footers

Updated: Feb 18, 2021

An HTML document begins with a <head> section. This section contains information about the document, as well as links to external resources, like CSS files or scripts. The <meta> tag is the first kind. It defines document attributes such as the character set, page keywords, a description of the page, and the author of the document. The <meta> tag is self-closing. Its attributes define its data, and include:

charset="" —defines the character set; default is "UTF-8"

name="" —defines the type of data being declared; options include "author", "keyword", "description", or "viewport". The author author attribute defines the document author, and the keyword defines the keywords used to find the page in a search engine. The description is the page description as seen in a search engine. The viewport option determines how to handle different screen sizes.

content="" —defines the value for a tag. The content type depends on the name attribute.


<meta charset="UTF-8"> <!-- Set the document's character set to UTF-8 -->

<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- This will automatically adjust the display to resize the page, based on the device's screen size.-->


<meta name="author" content="IsaacB"> <!-- sets the document author to "IsaacB"-->



The <link> element links to an external resource, usually a CSS sheet. This is another self-closing tag. Its attributes include:

rel="" —the relationship of the linked resource to the current document; is usually "stylesheet"

href="" —the location of the resource

hreflang=""

media="" —sets the device on which to display the resource

type="" —the media type of the resource

sizes="" —only for rel="icon"


Links are used almost always to attach a CSS sheet.


<link rel="stylesheet" href="stylesheet.css"> <!-- Links to a CSS sheet. The sheet can now be used to set style effects in this document. -->


Headers and footers can contain most HTML elements, but they are generally used only for introductory or concluding content:


<body>

<header>

<h3>The Top Of The Page</h3>

<p>This is the Top of the Page</p>

</header>

<p><strong><u>The main page content begins here</u></strong></p>

<p>main content main content main content main content main content main content main content</p>

<footer>

<p><strong>Written By:</strong>IsaacB</p>


<a href="http://www.minecaptain.com">Contact Me</a>

</footer>

</body>

And

That

Is

All

For

Now!


__RESOURCES__





12 views0 comments

Recent Posts

See All

Comments


Post: Blog2_Post
bottom of page