Html basic tags
Html
We all know Html is not a programming language. It's a Hyper_Text_Markup_Language as Html stands for. Html now these days widely used in websites for front end development. Not for styling but for creating elements, text headings and paragraphs. It is like a base for a website. Many and more things we can discuess about Html but for know let's move to words our topic:
Today we are going to talk about 10 Html basic tags and learn how they work:
Html Tags
1-Html Starting and ending tag:
The tag which symbolise/noted or can start or end a Html document is <html></html>. <html> is starting tag and where </html> is for end the document. We can say that <html> is an opening tag and </html> is a closing tag of a Html document. Note that there is diffrence of / farword slash only on opening and closing tag
for examlpe:
starting or opening the Html file.
<html>
"every thing"
</html>
There are two main parts of a Html documment. Can be sprated by two important tags. These tags always the part of a html file. 1 is it's head noted by head tags <head></head> and 2 it's body noted by body tags <body></body>.
<html>
<head>
.....
</head>
<body>
......
</body>
</html>
2-Head tags:
The pair of head tag contain very importent things of a html document i.e. language
of document, scales and tags of linked files that are imported or used.
<head>
<meta name="viewport" contant="with=device-width, initial scale=1.0">
<title>My Dreams</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/
font-awesome/4.7.0/css/font-awesome.min.css">
</head>
3-Body tags:
This is the part of Html document where we can actully code, where we can create our document's elements, text and tables, sections, scripts divisions and many more things.
<body>
<section class="main-header">
<script src="script.js"></script>
</section>
<script>
</script>
<section>
<div class="b1">
</div>
</section>
</body>
4- Headings:
Headings are the main element of any document, which gives the main idea to the readers. In Html there are 6 type or scales of Html headings, from h1 to h6. We can make simple text to heading with CSS but algorith of our searh engin can't determine it. So, it is prefer to use Html tags to declaring headings.
We can write these all with "H" and number from 1 to 6 with in a tag like:
Results will be:
5-Paragraph:
This tag is use to write simple paragraph in our Html document. we simlply use "<p>" tage to display a paragraph. like:
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit.<br>
Dolorem repellat, provident fugit temporibus error nobis laborum
assumenda perspiciatis doloribus architecto? <br>
Recusandae modi molestias error corporis assumenda aspernatur hic,
animi libero?
</p>
Results will be:
Wait..... What we write text in 5 lines but the result is in 3 lines.......
Hold on,
Html will never detect any simple next line in any document. For the next new line we have to use "Break line tag" so let's discuss about it.
6-Break line tag:
This tag is use to Display next line in a html document. This tag will be writen where we need to display next line. Will be written as <br>. There is no closing tag, only one tag will use for it <br>.
As shown in above example.
7-Bold Text:
b tag is used to bold text in Html document. Denoted by <b></b>.e.g:
<b>Lorem ipsum dolor sit amet consectetur adipisicing elit.</b>
Results:
8-Italic tag:
This tag is use to make text italic. Denoted by <i></i>.e.g
<i> Lorem ipsum dolor sit amet consectetur adipisicing elit.</i>
Results:
9-Under line:
The that use to use to under line text. Denoted by <u></u>.
e.g
<u> Lorem ipsum dolor sit amet consectetur adipisicing elit.</u>
Results:
e.g:
<s> Lorem ipsum dolor sit amet consectetur adipisicing elit.</s>
Results:
Comments
Post a Comment