What is HTML?
HTML stands for Hyper Text Markup Language.
What is meant by Markup Language?
It does not mean by a programming language, rather than programming it actually defines and gives structures for the contents in the web pages, by using them we define how each and every contents want to appear in the browser whenever we open any web pages.
How to identify it was a html and it has the annotations for the web content. By defining .html at the end of the filename any one can identify a html
How does it work?
In html everything is tags, it only knows tags, if we say anything to do it, we want to define that in the specific html tags.
How will tags look?
<tagname> content </tagname>
Whenever we define anything in html we want to use the tags, there are several tags available in the html, each one was created for specific use cases, mostly every tag have starting and ending tags, some could not have ending tags. The ending tag looks exactly like the starting tag but it begins with slash(“/”) to ensure it was an ending tag.
Suppose if we want to define something in the web page means we want to use the correct tag for what we are going to define in the html page. For example to define paragraph we would have to use
tag, here we want to define first stating tag
what was we want to put it inside the paragraph and after the content must we have to use the ending tag
, it looks like exactly like thisthis is the blog for the html page
.creating the first html file.
for that first open a folder where you want to create the html file, the create file with .html extension and open it in a text editor,
every html file begin with the tag
inside the tag use the tag, if we define anything inside body tag that will be displayed in the html page, for instance we will define a paragraph inside the body tag
<html>
<body>
<p>This is a paragraph.</p>
</body>
</html>
if we save it and open it the file in the browser we will see the paragraph inside what we have written in the
tag
there are several tags are use for define many things make appear in html
some of them are h1, p, button, table and more
h1 tag is used to ensure it was the heading of the page and it appears larger and bolder then the p tag.
<h1>this is the heading of the page</h1>
button is used to define button in the page,
<button>click me</button>
table helps to create table in the page
<table>
<tr>
<td>Emil</td>
<td>Tobias</td>
<td>Linus</td>
</tr>
</table>
best practice for writing html
Use semantic tags:
using appropriate tags such as header, footer, section, nav, will improve the structure and the accessibility of the our web page, Also it helps other use to understand other developer to understand we the tags are use
Include alt text for images:
Always using the alt attribute for the image helps accessibility.
Minimize the inline styles and scripts:
To keep our html cleaner and accessible using separate external css and javascript files instead of using inline style and script tags.
Ref :
https://en.wikipedia.org/wiki/Markup_language
https://www.w3schools.com/html/html_intro.asp


Top comments (0)