Jump to content

HTML/Basic tags

From Wikiversity
(Redirected from HTML/HTML tags)

(This article is under construction)

Basic HTML Tags and Structure

[edit | edit source]
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body></body>
</html>
All HTML documents must start with a document type declaration
<!DOCTYPE html>. This is to let the web browser knows that this is the html file. While omitted the type declaration would not change nor break the file as the web browser will default the file to reading html, it's a good practice to declare it so as there are other more advanced files such as xhtml, csv, etc.
<html></html>
Begin your HTML webpage
<head></head>
<head> tag contains the code which is not really seen by the website user. It contains for instant javascript or title tags. You will learn more in the next few pages.
<title></title>
<title> tag contains the title of the webpage which you see at the top of your browser tab.
<body></body>
<body> tag contains, like it says, the body of the webpage which the user can see.
As expected, if you save this html file and open it with a web browser, it will display a blank page.
  • Deep Dive:
[Tags for XML which include] HTML merely use diamond symbols: <> one uncut diamond, and then closed with </> a cut diamond.

The basic set of HTML words are put in the diamonds. The html reader will show an error if you miss one of the diamond symbols or missing the tag closure.

 
<html>
<head>
<title> Deep dive into HTML </title>
</head>
<body> This is the body section for the page.</body>
<p>This paragraph has a missing p closure tag
</html>

tag is a paragraph which you will learn more in the next few lessons. If you save this file with intentional missing closure, your editor will show an error, typically by displaying red color on the tags.

See Also=

[edit | edit source]

Declaration HTML