The most important tags are the ones that are used to define headings, paragraphs and line breaks. These are:
Heading tags: <h1></h1>
Note: The number in the tag goes all the way up to 6, much like how you define headings in Microsoft Word.
Paragraphing: <p></p>
Line breaks: <br></br>
Now let’s use these tags in this beginners html tutorial or example.
<html>
<head>
<title>Test </title>
</head>
<body>
<I>Hello World!!</I>
<strong><p><h1>what I have to say!</p></h1></strong>
<p>I have just been born</p>
<br><i>Really!</i>
</body>
</html>
Note how there is no closing </br> tag. <br> tags cannot be closed and are only there to specify the line breaks within the text. However, some people write the tag as <br/>. This is done because in XHTML, all tags must be closed and thus including the forward slash in the tag symbolizes that the tag has been closed in the same opening tag.
As with other computer languages, if you want to comment your code, you can do so in the following way:
<!– This is a comment –>
Another very important HTML tag is the <hr> tag. The <hr> tag is the horizontal rule tag that inserts a line to differentiate between the different objects of the webpage.
The best thing about HTML is that its not case-sensitive. That means that is ok to use both lowercase and uppercase text when writing tags. However, it is professional to use lowercase as recommended by the World Wide Web Consortium (W3C). Also, if you use XHTML, lowercase letters have to be used.
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
You must log in to post a comment.