Home Tutorials Exercises About Us
�You know you're in love when you can't fall asleep because reality is finally better than your dreams.� ? Dr. Seuss


�Don't walk behind me; I may not lead. Don't walk in front of me; I may not follow. Just walk beside me and be my friend.� ? Albert Camus


�If you tell the truth, you don't have to remember anything.� ? Mark Twain


�A friend is someone who knows all about you and still loves you.� ? Elbert Hubbard

Tags, Attributes, and Elements

Tags

Tags are used to mark up the start and end of an HTML element. A start tag consists of an opening angle bracket (<) followed by the element name, zero or more space separated attribute/value pairs, and a closing angle bracket (>).

Change your document so that it looks like this:


<!DOCTYPE html>
<html>
<body>
    Getting started with my first website.
</body>
</html>

Now save the document again, go back to the web browser and reload the page.

Attributes

An attribute defines a property for an element, consists of an attribute/value pair, and appears within the element�s start tag. An element�s start tag may contain any number of space separated attribute/value pairs. Attributes appear inside the opening tag and their values sit inside quotation marks. They look something like <tag attribute="value">Margarine</tag>. We will come across tags with attributes later

Elements

Tags tend not to do much more than mark the beginning and end of an element. Elements are the bits that make up web pages. You would say, for example, that everything that is in between (and includes) the <body> and </body> tags is the body element. As another example, whereas “<title>” and “</title>” are tags, “<title>Rumple Stiltskin</title>” is a title element.


Related Pages