HTML tags, Attributes and Elements (for beginners)

HTML tags;
 these are the keywords (tag names) surrounded by angle brackets
<tagname>content</tagname>

from the codes above the tag is divided into two categories which are

  • open tag that start at the beginning <tagname> 
  • closed tag. this is the ending tag which close the tags </tagname>
also HTML tags normally come in pairs like
  • <p>
  • </p>
the first tag in a pair is start tag; the second one is the end tag.
NB, the tag is written like the start tag, but with a slash (/) before the tag name.


Attributes;
tags can also have attributes, which are extral bits of information.
attributes appear inside the opening tag and their values sit inside quotation marks. they look something like  <tag attribute="value">Margarine</tag>

elements;
elements are the bits that make up web pages for example
<body>mchuchuri ni mtundu sana jamani. </body>

everything that is between (and includes) <body>and</body> tag is body element,

another example is ;
<title> and <title/> are the tags <title> chully </title> is a title.

THE ESSENTIAL OF HTML TAGS

  • <!DOCTYPES> this tag defines the documents type and HTML version.
  • <html> this tag encloses the complete HTML document and mainly comprises of document header which is represented by <head>...</head> and document body which represented by <body>...</body> tags.
  • <head>  this tag represents the document's header which can keep other HTML tags like <title>, <links> and others.
  • <title>  the <title> tag is used inside the <head> tag to mention the documents title.
  • <body>  this tag represents the document's body which keeps othe rHTML tag like <h1>, <div>, <p> etc.
  • <!--...--> this is defines a comment.




prepared by IBRAHIM MCHUCHURI

HTML tags, Attributes and Elements (for beginners) HTML tags, Attributes and Elements (for beginners) Reviewed by Unknown on May 10, 2017 Rating: 5

No comments

Random Posts

3/random/post-list