You are now ready to learn the core language of HTML elements.
Elements of a structure in the code the HTML document and tells the browser how to present the website information. Generally, the element consists of a start tag, content, and a closing tag.
"Tags"?
Tags are labels used to mark the beginning and end of the element.
All tags have the same format: start with a less than "<" and end with a majority of ">".
Generally speaking, there are two types of tags - opening: and closing . The only difference is the forward slash "/" added the closing tag. Content by putting it between the opening and closing tag.
Everything in HTML is based on the elements. To learn HTML is to learn and use different tags.
Can you show me some examples?
Ok, the element em emphasis text. All text between the opening tag and the tag <b> zmykajÄ…cym will be bold in your browser. ("B" stands for "bold" or clear.)
Example 1:
<b> This text must be bold. </b>
Will look like in the browser:
This text must be bold.
The elements h1, h2, h3, h4, h5 and h6 are used to make headings (h stands for "heading"), where h1 is the first level so that the largest text, h2 is the second level and will be slightly smaller text, and h6 is the sixth and last in the hierarchy of headings - the smallest text.
Example 2:
<h1> This is a heading </h1>
<h2> This is a subheading </h2>
Will look like in the browser:
This is a heading
This is a subheading
So, I always have to open and close tags?
As they say, there are exceptions to every rule and the exception is the HTML that there are several elements for which the opening and closing tag has the same meaning. These so-called empty elements are not connected in any way with the text, rather are isolated labels, for example, a new line looks like this:
.
Tags better to write from a large or small letters?
Most browsers do not look to case markers. , Or normally give the same result. However, the correct tags in lowercase. So get into the habit of writing tags in lowercase.
Where do I put all these tags?
Your tags in an HTML document. Website contains one or more HTML documents. Surfing the web, almost every time you open other HTML documents.
If you continue to learn, in the next lesson in 10 minutes you create your first website.
No comments:
Post a Comment