The instructions that make up web pages are written in Hyper-Text Markup Language, or HTML for short. Each page is divided by portions of text within Tags, which provide instructions for how to style the page and the elements it contains. Let's look at the basic anatomy of a simple web page as a whole:
<html>
<head>
<title>Hello HTML</title>
</head>
<body>
<h1>This is the Page Headline!</h1>
<p>This is some text in the body of the page.</p>
</body>
</html>
You can see that the tags, enclosed in the < > braces tell the browser what part of the page each block of text belongs to, and how to display it. You'll also notice that all of the tags in this example have opening tags <...> and closing tags, which have a slash in them </...>. These define the start and end of each tag. So the browser knows that everything between the <body> and the </body> tags belong in the page's body portion of the document. Let's step through each tag, and I'll give you a basic understanding of what they do.
We start off with the <html> tag. This tells the browser that this page should be displayed as a web page, instead of another format such as an image or plain text document. The <head> specifies everything the browser needs to know about the page as a whole before the rest of it is loaded. In this example, we specify that the <title> of the page is "Hello HTML" which is the title you will see in the browser's title bar on the very top of the window. The page <body> contains only two pieces of text, a <h1> tag which means that text should be displayed in strong, bold, header-worthy text that you commonly see at the start of a post or a web page. The other tag is the <p> tag, or paragraph, which means that is a paragraph of text, and should be displayed with the appropriate spaces around it.
This was a really simple example of HTML, but hopefully you aren't feeling intimidated by the cryptic code you see associated with web-design. My goal is to ease the inexperienced user into this field, and I don't want to move too quickly. Stay tuned, up next is more about HTML Tags and something Tags have called Attributes.
See you next time :)
No comments:
Post a Comment