Alara's Guide To HTML!!!


In HTML you need to close every <something> with </something>

You should always start with <!Doctype html> to tell the browser that we are using HTML

You continue with <html> to show that everything in that is HTML conetnt

Head of a HTML page is where that information like; the title, the meta tags etc. about the page are

Body of an HTML page is where all the visible stuff is. You can add; titles, paragraphs, imeges, links, buttons, videos etc. to the body of an HTML page




Common tags:

Headers:

Headers are usualy used for titles or subtitles. They are automaticly bold and come in sizes.

Header Sizes & Their Tags:

<h1>

<h2>

<h3>

<h4>

<h5>
<h6>

Paragraphs:

Paragraphs are blocks of text that are automaticly given a size.

To call a paragraph you use the tag: <p>



Hyperlinks:

To add an hyperlink use the code on the right

Href means Hypertext REFerance

You can anter the <a> with;

DemoLink

Adding Imeges:

To add an imege to your page you use the <img>, should also eneter a src(source) imege to display.

Just like other tags you can set parameters and style.

The code imege by the right is an example to the use of imege tag




Adding Audio & Videos:

To add any audio to you page you use the <audio>, to add an video to your page you use <video>.

One of the parameters you need to add is controls, they are needed for the user to control the audio or the video.


Example: The Nyan Cat Video


Lists:

There are 3 types of lists:

  1. Unordered Lists:
  2. Ordered Lists
  3. Description Lists

Text Formating:


Output:

Input:


Drawing tables

You open a <table> tag

To set table rows you use <tr>(which means Table Row)

While setting values for table row elements you can use <th>(Table Header) or <td>(Table Data). The difference is table headder tag is already bolded and centered while table data tag is left-aligned and normal weight.


Meta Tags:

Meta = Data about data

Meta tags are placed in the head of the page and they are not visible.

You can set information about the page like; which character set you use(japanese, latin, arabic, etc.), the author of the page, description of the page content, or the page width.

Examples;

<meta charset="UTF-8">
Says that you used english letters
<meta name="viewport" content="width=devicewidth, initial-scale=1.0">
Says that you are setting the page width the same width as the device and that the page's scale is 1.0


Buttons:

Buttons let users interact with the page. Buttons can open a link, run JS code, or submmit forms.

In other words they are empty cases themselfes but when filed with links or code they can do all shorts of things.

Mini example: Button that takes you to google.com



Forms:

Forms are how web sites collect information from you, they are used for sign-up, log-in, or quizzes.

To start a form you use the <form> tag

There are lots of types you can collect info using forms

Text input
<input type="text" placeholder="Enter your name">

Password Input
<input type="password" placeholder="Create a password">

Email input(checks for @ or . )
<input type="email" placeholder="you@example.com">

Number input(you can add min and max)
<input type="number" min="1" max="100">

Date input
<input type="date">

Time input
<input type="time">

Checkbox(for selecting multiple of the given options)
<input type="checkbox" id="something">

Radio buttons (for selecting one of the given options)&&(they need to have the same name to work togeter)
<input type="radio" name="color" value="red">Red

Text Area
<textarea rows="4" cols="30">Enter your feedback here...

Quick Example: