SANKALP STUDY SUCCESS
Way to Learn and Key to Success
TOPIC: HTML STRUCTURE
CHAPTER 1 – CREATING OUR FIRST WEBSITE
We start building a website by creating a file named [Link]. [Link] is a special
filename which is presented when the website root address is typed.
A BASIC HTML PAGE
<!Doctype html> <!-- Specifies this is an html 5 document -->
<html> <!-- Root of an HTML page-->
<head> <!-- Contains page metadata. -->
<title>Harry's Website</title> <!-- Contains title -->
</head>
<body> <!-- The main body of the page (rendered by the browser) -->
<h1> <!-- This is a heading <h1> - heading tag -->
<p> My paragraph </p> <!-- Paragraph tag -->
</body> <!-- Closing
A tag is like a container for either content or other HTML tags.
IMPORTANT NOTES
<head> C <body> tags are children of HTML tag.
HTML is the parent of <head> C <body> tags.
Most of the HTML elements have opening C closing tag with content in between
opening C closing tags.
Some HTML tags have no content. These are called Empty elements e.g. <br>
We can either use .htm or .html extension.
you can use “inspect element” or “view page source” option from Chrome to
look into a website’s HTML Code.
COMMENTS IN HTML
Comments in HTML are used to mark text which should not be parsed. They can
help document the source code.
<!-- HTML COMMENT -->
CASE SENSITIVITY
HTML is a case insensitive language. <H1> and <h1> tags are the same.
CHAPTER 1 – PRACTICE SET
1. Inspect your favourite website and change something on the page
which is displayed.
2. Go to your favourite website and try to view the page source and write the
exact lines of code. Does it clone the website? Why?
3. Write any HTML code inside a text file. Does it work if you write it using notepad?