Day-2 Pushing HTML coding in Git and Github
Learn about the href attribute of anchor tag <a>
The <a>anchor tag defines a hyperlink, which is used to link from one page to another. By using href attribute inside the anchor tag
<a href="actual link"> link name </a>
ex: <a href="https://hashnode.com/@GarimaHtlmlCode" target="_blank"> <h1>Let's visit my hashnode</h1></a>
First www Project
Project World Wide Web Project it contains headings ,side headings ,anchor tag with href attribute in the paragraph element. By doing this project in HTML we are able to get awareness on anchor tag attribute.
ex: <p>giving a link<a href="Link">project</a>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>www.project</title>
</head>
<body>
<h1>world wide web</h1>
<p>The WorldWideWeb (W3) is a wide-area <a href="https://info.cern.ch/hypertext/WWW/WhatIs.html">hypermedia</a> information retrieval initiative aiming
to give universal access to a large universe of documents.</p>
<p>Everything there is online about W3 is linked directly or indirectly to this document, including an
<a href="https://info.cern.ch/hypertext/WWW/Summary.html">executive summary </a>of the project,
<a href="mail"> Mailing lists</a> ,
<a href="https://info.cern.ch/hypertext/WWW/Policy.html">policy</a> , November's
<a href="W3 news">w3 news</a> ,
<a href="frequently">Frequently Asked Questions</a> .</p>
<h3><a href="https://info.cern.ch/hypertext/DataSources/Top.html">what's out there?</a></h3>
<p>Pointers to the world's online information,
<a href="subjects">subjects</a> ,
<a href=" W3 servers">w3 servers</a>, etc.</p>
<h4><a href="help">Help</a></h4>
<p>on the browser you are using
</p>
<h4><a href="Software Products">Software Products</a></h4>
</body>
</html>
Knowing about Git and Github
Git : It is a free and open-source version control system that manages and keeps track of your code.
Github : It is a platform for developer to store ,share and push the code in public.
How to push Code in GitHub:
First download and install GIT and verify it's version by giving "git -v" in command prompt .
Second go to github.com and create a account by signup.
After creating account create a repository init.
- In vscode left side--> accounts ->sign in--> choose github and it will open browser and github login screen , enter username,password--> login-->authorize-->it will redirect to vscode
After connecting vscode with github now push your code into it by giving following commands.
Actual Process: open terminal---> new terminal--> goto specific folder
Now give your Github Repository commands
git init - it will initiate git into your folder
git add . -- it will add all the files into git
git commit -m "update" - it will commit your git and added a message update
First time you may end up git config errors. like this:-
git config --global user.email "you@example.com" git config --global user.name "Your Name"
to set your account's default identity. Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'Lenovo@SERVER.(none)')
To solve it do following commands
git config --global user.email "your email id"
git config --global user.name "username"
After this try git add . and git commit -m "update" again.
(git branch -m master/main----the branch present in your vscode ),
4. git remote add origin " ->your repository link"
5. git push -u origin main ->it push your code into github repository.