Introduction to Html
1. First in order to start a website first we need to write the sample code for
html so instead of memorizing the whole sample code simply press “!” and
then press enter that’s it you will get the sample code written for you in VS
code.
2. Type <h1>/<h2>/<h3>/<h4>/<h5>/<h6> for headings larger the
number smaller the heading. H1 is used for most important heading and
h6 is used for least important heading. Only use headings for important
headings. Don’t use headings just to simply increase the font size of a
paragraph, for paragraph use <p>.
3. Use “<br>” tag to give space between code/lines.
4. Use “<!—" to comment the code/line.
5. Html is not case sensitive so we can write any tag in capital letters also.
6. If you want to comment the selected text then press ctrl+/
7. If the code we wrote was long and we want that code to visible in line by
line but not side by side then select the text and go to setting and search
“Toggle Word Wrap” and select it
8. To add link to your page then write <a href= “ Paste your link here”>Write
the name of the link
9. To add image write <img src=”Paste the link of the image”. If the image is
downloaded in your laptop then add the image to your folder and rename
it and then write the renamed version
[Link] <b> for bold text, <i> for italic text, <u> for underline
[Link] <big> for big text and <small> for small text
[Link] <hr> tag to display a horizontal ruler, used to separate content
[Link] <sub> tag for subscript, example H2O. Use <sup> tag for
superscript, example A power n
[Link] <pre> tag to display text as it is including spaces.
[Link] adding information in website like education, experience etc we have
to write <section> and then write those information
[Link] your adding additional information to the website which is not necessary
for website, example “My story” then write <article> and then add the
information
[Link] adding link to your website if we click on the link then it will open in
the same page in order to overcome this write <a
href=”Link”target=”_main”>Name of link
18.I f you want a clickable image which means if we click on the image the
link opens then write <a href=”Link”><img src=”link of the photo”>
19.<div> is a container used for other HTML elements
20.<span> is also a container used for other HTML elements
[Link] prepare lists there are two types unordered and ordered
[Link] unordered list write
<ul>
<li> ….
<li>…..
[Link] ordered list write
<ol>
<li>….
<li>….
[Link] in HTML
<tr> is used to display table row
<td> is used to display table body
<th> is used to display table header
[Link]
<table>
<tr>
<th> Name
<th> Roll no
<tr>
<tr>
<td>Karthik
<td>10
<tr>
<table>
[Link] add caption to the table write <caption> Student data
[Link] in HTML (login/sign in)
<form>
Form content
[Link] a blank box write
<form action=”/[Link]”>
<input type=”text” placeholder=”Type something here”
[Link] labels in HTML
<form action=”/[Link]”>
<label for=”101”
<input type=”radio” value=”11 th class” id=”101” name=””class”>class
12th
[Link] multiple options selection
<input type=”checkbox” value=”11th class” id=”101”
name=”class”>class 12th
[Link] city select option
<select name=”city” id=”city”>
<option value=”Vizag”> Vizag</option>
[Link] submit button
<form>
<input type=”submit” value=”submit”>
[Link] add a youtube video to your website copy the embed of the video and
paste it directly