HTML_Learn
HTML_Learn
علَى آ ِل ُم َح َّمد،
علَى ُم َح َّم ٍد َو َ
علَى إِب َْراهِي َمَ ،وب َِاركْ َ
صلَّيْتَ َ
علَى آ ِل ُم َح َّمدٍَ ،ك َما َ
علَى ُم َح َّم ٍد َو َ اللَّ ُه َّم َ
ص ِ ِّل َ
علَى آ ِل ِإب َْراهِي َم ،فِي ا ْل َعالَمِ ينَ ِ ،إنَّكَ حَمِ ي ٌد َم ِجي ٌد. َك َما ب َ
َاركْتَ َ
❖ HTML stands for Hyper Text Markup Language
Tags
<html> element is the root element of an HTML page
<title> element specifies a title for the HTML page (which is shown
</title> in the browser's title bar or in the page's tab)
<body> element defines the document's body, and is a container for
all the visible contents, such as headings, paragraphs,
</body>
images, hyperlinks, tables, lists, etc.
<h1> element defines a large heading
</h1>
كل ما الرقم يكبر كل ما حجمه يصغر يعنيh6 لh1 عندنا من
ده أكبر واحد فيهمh1
<p> element defines a paragraph
</p>
<a> HTML links are defined with the علشان اضيف لينك للصفحه عندي
</a>
<a href="https://www.MohamedMaklad.com"> </a>
<img> <img src="اسم الصوره.jpg" width="104" height="142">
<br> Add New line علشان اعمل سطر جديد
<hr> Defines a thematic change in the content ده بيضيف خط كده فاصل
<sup> ➔
<figure> contain images and their caption so that the two are associated
HTML List Tags
<ul> unordered list
➔
➔
HTML Forms
<form> element is used to create an HTML form for user input
<input>
<input
type="text">
➔
The <label> element also help users who have difficulty clicking
on very small regions (such as radio buttons or checkboxes) -
because when the user clicks the text within
the <label> element, it toggles the radio button/checkbox.
<input defines a reset button that will reset all form values to
type="reset"> their default values
rows ➔ number of
lines cols ➔
width
<fieldset> is used to group related data in a form.
<legend> defines a caption for the <fieldset> element
<output> element represents the result of a calculation بتطلع ناتج عمليه معينه
اللي هيحصل هل هيحصل في نفس نفس الصفحه وال هفتحAction الSubmit دلوقتي ضغطت علي
صفحه جديده وال ايه
Notes
❖ HTML tags are not case sensitive: <P> means the same as <p>.
مبيفرقش استخدم كابيتل وال اصمول هو هو و الكود هيشتغل عادي
❖ name="value" attributes تعريف
❖ When the browser comes across two or more spaces next to each other, it only
displays one space
By default, an ordered list will start counting from 1. If you want to start
counting from a specified number, you can use the start attribute:
➔
➔
➔
GET POST
• Appends the form data to the URL, • Appends the form data inside the
in name/value pairs body of the HTTP request (the
submitted form data is not shown in
the URL)
• NEVER use GET to send sensitive • use POST to send sensitive data
data! (the submitted form data is (the submitted form data is not
visible in the URL!) shown in the URL)
• Useful for form submissions where a • Form submissions with POST cannot
user wants to bookmark the result be bookmarked
❖ Border Color:
❖ In HTML, colors can also be specified using color names, or RGB values, HEX values,
HSL values, RGBA values, and HSLA values
❖ RGB Color Values:
➢ rgb(red, green, blue).
➢ Each parameter (red, green, and blue) defines the intensity of the color with a
value between 0 and 255.
➢ For example, rgb(255, 0, 0) is displayed as red, because red is set to its highest
value (255), and the other two (green and blue) are set to 0.
➢ To display black,➔ rgb(0, 0, 0) , white ➔ rgb(255, 255, 255)
Target
Link
❖ HTML - The Head Element:
➢ The HTML element is a container for the following elements:
➢ HTML metadata is data about the HTML document. Metadata is not displayed
➢ Metadata typically define the document title, character set, styles, scripts, and
other meta information
➢ <meta> element is typically used to specify the character set, page description,
keywords, author of the document, and viewport settings
➢ The metadata will not be displayed on the page, but are used by browsers (how to
display content or reload page
❖ HTML Media:
➢ Multimedia files have formats and different extensions like: .wav, .mp3, .mp4,
.mpg, .wmv, and .avi.
➢ Only MP4, WebM, and Ogg video are supported by the HTML standard.
➢ Only MP3, WAV, and Ogg audio are supported by the HTML standard
❖ The HTML Element:
➢ <video> element is used to show a video on a web page
➢ <source> element allows you to specify alternative video files which the browser
may choose from. The browser will use the first recognized format.
➢ Add muted after autoplay to let your video start playing automatically
❖ What is XHTML?
➢ XHTML stands for EXtensible HyperText Markup Language
➢ XHTML is a stricter, more XML-based version of HTML
➢ XHTML is HTML defined as an XML application
➢ XHTML is supported by all major browsers
❖ Why XHTML?
➢ XML is a markup language where all documents must be marked up correctly (be
"well-formed").
➢ XHTML was developed to make HTML more extensible and flexible to work with other
data formats (such as XML).
➢ In addition, browsers ignore errors in HTML pages, and try to display the website
even if it has some errors in the markup.
➢ So XHTML comes with a much stricter error handling.
❖ The Most Important Differences from HTML:
➢ <!DOCTYPE> is mandatory
➢ The xmlns attribute in <html> is mandatory
➢ <html>, <head>, <title>, and <body> are mandatory
➢ Elements must always be properly nested
➢ Elements must always be closed
➢ Elements must always be in lowercase
➢ Attribute names must always be in lowercase
➢ Attribute values must always be quoted