Previous Lecture Complete and continue

Web Design

Understaning Tags

 

Tags are the building blocks of HTML. There are two types of tags: one that opens and one that closes. The HTML tags themselves are the first set of tags we'll write. One HTML tag is placed at the top and one is placed at the bottom:

 

 

This indicates that the code is in HyperText Markup Language to a browser like Internet Explorer or Firefox.

 

There are two things to take note of here. One, that the word HTML is surrounded by angle brackets (the Less Than and Greater Than keys on your keyboard); and two that the second Tag has a forward slash before the HTML.

 

Angle brackets > must be used to surround all of your tags. This informs the browser that some HTML code has to be executed but will not be displayed on the web page. If you leave an angle bracket out, your web page will look terrible.

 

The first tag instructs the browser to begin doing something, while the second instructs it to stop doing it. That forward slash is the stop symbol. So miss that out and, again, your web page can really be messed up.

 

The HEAD tags are the next set of tags: They're sandwiched between the two HTML tags:

The Title tag always goes in the HEAD section of the HTML skeleton.

 

 

 

                 

 

 

               Again, both HEAD tags are surrounded by angle brackets, and the final one /HEAD> has a forward slash preceding it.

The HEAD section of an HTML page is where you can provide the browser special instructions. When objects are included into the HEAD area, your browser will not print directly to a web page. For example, if you typed the words "Hello World" in between the two HEAD tags, the Browser would simply ignore them. Because 'Hello World' is plain text rather than a special instruction that the browser can interpret, this is the case.

The majority of your HTML code will be written within those two BODY tags. Consider the BODY to be the blank page in Word Processing. When you type something into your word processing program, it appears right away. Similarly, if you type something between the two BODY tags and then look at the results in a browser, you'll see whatever you typed. Your browser will try to display it for you as long as it isn't a tag. Remember to put it between the BODY tags if you want people to see it.

the  Doctype tag .It's not exactly an HTML element, but rather a directive to the browser regarding which HTML version is permitted. 

The DOCTYPE in HTML versions prior to HTML 5 could be somewhat messy. 

However, in HTML 5, it's as simple as this: 

The DOCTYPE tag must appear at the very top of the page. DOCTYPE does not have an end tag. 

As a result, include a DOCTYPE at the start of your page. This is what your text editor will look like:

Click the File menu at the top of Vs code to save your code as a web page (or whatever Text Editor you are using.) Select Save As from the File menu. The dialog box Save As appears (We created a new folder to store all our web pages in, and called the folder HTML

 

 

Discussion

Get answers directory from your instructor
if you have any question about this topic.

Arraanging tags

Is it necessary to arrange your tags in a particular order?
EMMANUEL OSEI-BONSU

2 years ago

If you are talking about the arrangement of tags with regards to which particular ones go into others (eg. the' title' tag goes into the 'head' tag and 'div' tags go into the 'body' tag), then the proper arrangement is always necessary. But if you are referring to the indentation or adding of paragraphs to new lines of code as 'sub tags' are created, it isn't a must. You code will still execute same results with or without the line indents.
Acolatse Gideon Kudjoe

9 months ago

Yes, very important to make it easy to identify your tags and elements