N.W.A
Respected Member
HTML Tutorials - Tags
After taking a small break I`m back with the HTML tutorials and this time we are going to learn about HTML Tags,I hope you enjoy the tutorials and lets get it going
A web browser reads an HTML document from top to bottom, left to right. Each time the browser finds a tag, the tag is rendered accordingly. Paragraph tags render paragraph text, image tags render images, etc. By adding tags to an HTML document, you are not only coding HTML, but also signaling to the browser, "Hey look, this is paragraph text; now treat it as such!"
If you recall that HTML elements are comprised of three major parts: the opening tag, the content, and the closing tag? As you will learn, there are infinite combinations of HTML tags/elements, including those used for forms, images, and lists. Everything displayed on an web page requires the use of a tag or two.
HTML Tag Code:
Code:
<tag>Content</tag>
<p>This text will be rendered like a paragraph.</p>
More HTML Tags
Code:
]<body>Body Tag
<p>Paragraph Tag</p>
<h2>Heading Tag</h2>
<b>Bold Tag</b>
<i>Italic Tag</i>
</body>
html - elements without closing tags
There are a few elements that do not require formal closing tags. In a way, they still have the 3 parts (opening/closing and content), but they are consolidated into one tag. The reason for this is that these tags do not really require any content to be placed within them, but sometimes may require attributes such as source URLs for images.
One prime, easy example of an HTML tag that does not require a closing tag is the line break tag.
HTML Line Break Code:
Code:
<br />
HTML Code
Code:
<img src="../mypic.jpg" /> -- Image Tag
<br /> -- Line Break Tag
<input type="text" size="12" /> -- Input Field
As you can see from the above, the web browser is capable of interpreting the image tag as long as we inform the browser where the image file is located, using the src attribute. Attributes will be discussed in more detail throughout the remainder of the tutorial. For now, it's a good time to start thinking about what type of website you want to make. It is always easier to make content for a topic or to achieve a goal.