Creating Our First Website.
- We start building a websites by creating a file named index .html.
- Index.html is a Special filename which is presented when the websites root address is typed.
- If you want use a boiler-print code in html then use: Shift + !+ Enter Button
Table Of Content:
A Basic Html Tags: -
<!Doctype html> <! --Specifies this is an html file Doctype -->
<html> <! --Root of an Html Page -->
<head> >Contains page metadata
<title>TechnSecret_Com</title> >Contains title
</head> >headers close
<body> > The main body of the page (recommended by the user lot of statements) such as:-
<h1>THis is 1st heading</h1> > This is heading tags
<p>My 1st Paragraph</p> >This is Paragraph tags
</body> > closing the body tags
</html> > closing the html file tags
Tags:
- A tag is like a container for either content or other Html tags:-
Important Points:-
- Ø Head and Body tags are Children of Html tags
- Ø Html is the parents of head & Body tags
- Ø Most of the Html elements have opening & closing tag with content in between opening & closing tags.
- Ø Some Html tags have no content, These are called Empty elements. Eg:- <br>
- Ø We can either use htm, or html for extension.
- Ø You can use “Inspect Elements” or “View page source” Option from chrome to look into a website’s HTML Code.
- HTML Elements =Start Tags + Content + End Tags
Comments in Html:
- Comments in HTML are used to mark text which should not be passed. They can help documents the source code.
- Ex:- <! -- HTML Comments Start from here,………. Then end of HTML comments -->
- Used Shortcut keys:- ctrl + sales ‘/’ Button then Single Line Comments all.
Case Sensitivity:-
- HTML is a case insensitive language such as:-
- <H1> mentions something </h1> Tags are the same.
- :- Well My recommended always use small letter If you want a better developer in future
Practice Set
- Q1. Inspect your favorite websites and change something on the page which is displayed.
- Hints:-Open any website > Click source list> modified same code > view source
- Q2. Go to your favorite websites and try to view the page source and write the exact lines of code. Does it the websites? Why?
- Hints :- Same As above questions 1 but use any official websites such as Wikipedia, it is not prefeact clone of sites but same word are match.
- Q3. Write any HTML code inside a text file. Does it work if you write it using notepad.
- 1st of all create a file:- notepad.txt
- Write something html code
- Then rename .txt from .html
- Then save and run
- All are possible, so why use live server with VS Code for future perfect a program
Don't Warry If you want all problem solution of code then comment, i can send for you. Tq..
Comments