HTML Tags
Two things to notice 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.
All your tags must be surrounded by the angle brackets < >. This tells the browser that there is some HTML code that needs executing, and that it is not to be shown on the web page. Miss an angle bracket out and it can really mess up your web page.
So add those two tags to your text editor and it will look like this:
The next pair of tags are the HEAD tags: They go between the two HTML ones:
The HEAD section of HTML page is where you put special instructions for the browser. Your browser will not print directly to a web page when things are inserted into the HEAD section. For example, if you wanted to display the words 'Hello World' on your page, and you typed them in between the two HEAD tags, then the Browser would just ignore them. That's because 'Hello World' is direct text, and not a special instruction that the browser can understand.
A special instruction your browser can understand is the TITLE tag:
The final, and most important part, of the HTML skeleton is the BODY section.
In your text editor, then, add the following:
DOCTYPE
One special tag is DOCTYPE. It's not really a HTML tag, but an instruction to the browser about which version of HTML is allowed. In version of HTML prior to HTML 5 the DOCTYPE could be very messy. In HTML 5, however, it's just this:
So add a DOCTYPE to the top of your page. Your text editor will look something like this:
Friday, 10 July 2015
HTML Tags
<HTML>
</HTML>
This tells a browser like Internet Explorer or Firefox that the code is HyperText Markup Language.
<HTML>
<HEAD>
</HEAD>
</HTML>
Again, notice that both the HEAD tags are surrounded by angle brackets, and there is a forward slash before the final one </HEAD>.
<TITLE> </TITLE>
The Title tag always goes in the HEAD section of the HTML skeleton.
<!DOCTYPE HTML>
DOCTYPE needs to go at the very top of the page. There is no end tag for DOCTYPE. Note the exclamation mark after the first angle bracket, and the space between DOCTYPE and HTML.
0 comments:
Post a Comment