Tuesday, 10 May 2016

// // Leave a Comment

The Structure of HTML

Before starting to use HTML it is important that you accept the anatomy of HTML. As HTML is a markup language, you use it to mark up altered locations of your agreeable - affectionate of like if you are application a highlighter.
HTML Elements
HTML is constructed of elements and it is these elements you use to do your markup. Below is an archetype of how you could mark up a approved text-paragraph.

<p>This paragraph is part of my content</p>

What we have here is a sentence (”This paragraph is part of my content”) which have been placed between <p> and </p>. The <p> and the </p> is called tags. Every tag consists of a <, an abbreviation, and a >. In this case, p is an abbreviation for paragraph. Combined, the <p> and the </p> tags create an element. Every HTML-element starts with an opening tag (in this case, that is <p>) and most have a closing tag (that is </p>). Inside the opening and the closing tag of your element is the actual content.

Empty Elements

Most HTML-elements looks like the

element, but some are what we alarm abandoned elements. The line-break aspect is such one and looks like this:


As you can see, there is no closing tag and the aspect do not accommodate any content, accordingly it is alleged an abandoned element. Because this is an abandoned aspect it is bankrupt at the end of the tag – that’s the /. You don’t accept to use the ”/” at the end of an abandoned element, but it is advised acceptable practice, so you ability as able-bodied get acclimated to it. (As I said before, the tag consists of an abridgement and in this case br stands for break).

TIP!

When the browsers apprehend your HTML5 certificate they don’t affliction whether or not you address your tags in uppercase or lower case. But added developers do! Even admitting you could address the aforementioned linebreak-tag in a lot of altered ways, such as these:
Try this example

<BR />
<bR/>
<Br />
<br />



It is advised acceptable convenance to address all your tags in lowercase – in increases readability, and it is just advised acceptable adroitness to address your tags this way.

What you accept abstruse so far:

An HTML aspect starts with a aperture tag
An HTML aspect ends with a closing tag
A HTML tag starts with a < and ends with a >
The belletrist amid the < and > are abbreviations
The aspect agreeable is aggregate amid the alpha tag and the end tag
Some HTML elements are empty
Empty elements are bankrupt in the alpha tag
Make it a habbit to blazon all your tags in lowercase - it is advised acceptable practice

0 comments:

Post a Comment