You have learned to write your first ever webpage in HTML using our previous HTML beginner tips, but you know there is more to it than just typing random words and saving the file as a plain text with “.html” specified in its end. Some of you may even exclaim “that’s it?” in utter disbelief because, hey, let’s face it, that is too easy!
It’s true that there is more to it than that, and now that you’ve mastered the first step, we can move to the next on our HTML tutorials: how to make your webpage more elaborate using attributes, tags, and elements.
What you need to know about tags
Tags is considered a part of the HTML document’s basic structure. Surrounding the content you type in html, tags give the sequence you’ve just typed more meaning. Take a look at the following example to Learn HTML:
It’s my first ever webpage
Once saved, you would see that there’s no change whatsoever on your browse. Why? That’s because the purpose of applying tags isn’t for presentation – but rather for meaning. The “!DOCTYPE” part, for instance, its purpose is to let your browser know that it’s a declaration, and the “<html>” part is an opening tag that notifies the message of elements conveyed.
How to use attributes and elements
Attributes is a part of tags which purpose is to give more information on the meaning that the tag is trying to convey, whereas elements is what’s written in between the opening-closing tags. Need a simple HTML advice to help you memorize the difference? Take a look at the following:
Another thing worth noting is the fact that the above quotation marks aren’t mandatory, but advised as it shows good practice.
<title> </title> is called tags, whereas
<title> Cookie Cutter </title> is referred to as a title element.