Coding Club

 WELCOME TO OUR PAGE CODING CLUB

Hello my Dear Friend this page is  complete for learning purpose from here you can learn how to make website and webpages so don't forget to follow our page and my youtube channel GYANISTA.


What is HTML

(1)       HTML stands for Hyper Text Markup Language

(2)       HTML is the standard markup language for creating Web pages

(3)       HTML describes the structure of a Web page

(4)       HTML consists of a series of elements

(5)       HTML elements tell the browser how to display the content

(6)       HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc.

Explanation of Tags 

(1) The <html> element is the root element of an HTML page

(2) The <head> element contains meta information about the HTML page

(3) The <title> element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab)

(4) The <body> element defines the document's body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.

(5) The <h1> element defines a large heading

(6) The <p> element defines a paragraph


How to Open Notepad File


In Starting of Learning of HTML & Website development you should start with Notepad or text editor later on we can use Notpadd++ VSCode and Sublime text software



How to open notepad file

Step - 1 Click on your Start Button from keyboard.

Step - 2 Write Notepad from keyboard and press enter.







How to write Code in Text Editor File.







(Code-1)


<html>

<head>
<title>My first Web Page</title>
</head>
<body>

<h1>This is a Heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

Output


Heading Tag

(Code-2)

<html>

<body>

<h1>Heading 1</h1>

<h2>Heading 2</h2>

<h3>Heading 3</h3>

<h4>Heading 4</h4>

<h5>Heading 5</h5>

<h6>Heading 6</h6>

</body>

</html>

Output




Paragraph Tag

HTML Paragraphs

The HTML <p> element defines a paragraph.

A paragraph always starts on a new line, and browsers automatically add some white space (a margin) before and after a paragraph.


(Code-3)


<html>

<body>

<p>This is a paragraph.</p>

<p>This is a paragraph.</p>

<p>This is a paragraph.</p>

</body>

</html>

Output



P vs Pre Tag 


(Code-4)

<html>
<body>

<p>
This paragraph
contains a lot of lines
in the source code,
but the browser 
ignores it.
</p>

<p>
This paragraph
contains      a lot of spaces
in the source     code,
but the    browser 
ignores it.
</p>

<p>
The number of lines in a paragraph depends on the size of the browser window. If you resize the browser window, the number of lines in this paragraph will change.
</p>

</body>
</html>


Pre Tag 


The HTML <pre> element defines preformatted text.

The text inside a <pre> element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks:


(Code-5)


<html>

<head>

<title>pre tag</title>

<body>

<pre>
This paragraph
contains a lot of lines
in the source code,
but the browser 
ignores it.
</pre>

<pre>
This paragraph
contains      a lot of spaces
in the source     code,
but the    browser 
ignores it.
</pre>

</body>

</html>




HR Tag


The <hr> tag defines a thematic break in an HTML page, and is most often displayed as a horizontal rule.

The <hr> element is used to separate content (or define a change) in an HTML page:

The <hr> tag is an empty tag, which means that it has no end tag.

(Code-6)


<html>

<body>

<h1>This is heading 1</h1>

<p>This is some text.</p>

<hr>

<h2>This is heading 2</h2>

<p>This is some other text.</p>

<hr>

<h2>This is heading 2</h2>

<p>This is some other text.</p>

</body>

</html>



BR Tag

HTML Line Breaks

The HTML <br> element defines a line break.

Use <br> if you want a line break (a new line) without starting a new paragraph:


(Code-7)

<html>

<body>

<p>This is<br>a paragraph<br>with line breaks.</p>

</body>

</html>




HTML Styles
The HTML style attribute is used to add styles to an element, such as color, font, size, and more.
How to Change Color of Text & Size
(Code-8)

<html>
<body>
<p>I am normal</p>
<p style="color:red;">I am red</p>
<p style="color:blue;">I am blue</p>
<p style="font-size:50px;">I am big</p>
</body>
</html>

How to Change background of webpage 

(Code-9)

<html>
<body style="background-color:powderblue;">
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>

Background color for two different elements:

(Code-10)

<html>
<body>
<h1 style="background-color:powderblue;">This is a heading</h1>
<p style="background-color:tomato;">This is a paragraph.</p>
</body>
</html>

Fonts


(Code-11)


<html>
<body>

<h1 style="font-family:verdana;">This is a heading</h1>
<p style="font-family:courier;">This is a paragraph.</p>

</body>
</html>

Text Alignment

(Code-12)

<html>
<body>

<h1 style="text-align:center;">Centered Heading</h1>
<p style="text-align:center;">Centered paragraph.</p>
<p style="text-align:right;">Centered paragraph.</p>
<p style="text-align:left;">Centered paragraph.</p>

</body>
</html>



















Post a Comment

نموذج الاتصال