The <body> tag is used to define the body section of an HTML document, which contains the visible content of the document.
A hyperlink is a link that connects one web page to another or links to other resources on the same page.
HTML stands for HyperText Markup Language
A web page is an electronic document especially formatted for the web. A collection of related web pages is called a web site
Every time a specific web site is accessed, the first page that will be displayed is the home page. Home page is the starting page of the web site. It is similar to a book cover and it may function as the table of contents of the web site.
HTML (Hyper Text Markup Language) is the primary language used to create web pages. Although it is not considered as a programming language, it contains specific rules for defining the placement of text, graphics, video and sound on the web page
Empty tag - this type of HTML tag doesn't have an end tag/command
Container tag - this type of HTML tag requires an end tag and usually comes in pairs.
<html> is used to indicate that the text enclosed in this tag is in HTML format and that it can be viewed using the browser.
</head> indicates that all information inside this tag are about the head or header of the document.
<title> is placed inside the <head>... </head>. The information placed inside this tag will be displayed on the title bar of the browser window.
Web pages can be created and modified by using professional HTML editors. However, for learning HTML it is recommended to use a simple text editor like Notepad (PC) or TextEdit (Mac), as it is a good way to learn HTML.
Step 1: Open Notepad/ Text Edit
Step 2: Write Some HTML
Step 3: Save the HTML Page.
Step 4: View the HTML Page in Your Browser.
All HTML elements can have attributes , but not all attributes are HTML elements.
The href Attribute
The <a> tag defines a hyperlink. The href attribute specifies the URL of the page the link goes to
The src Attribute
The <img> tag is used to embed an image in an HTML page. The src attribute specifies the path to the image to be displayed
The width and height Attributes
.
The <img> tag should also contain the width and height attributes, which specify the width and height of the image (in pixels
The alt Attribute
.
The required alt attribute for the <img> tag specifies an alternatetext for an image, if the image for some reason cannot be displayed. This can be due to a slow connection, or an error in the src attribute, or if the user uses a screen reader.
The style Attribute
.
The style attribute is used to add styles to an element, such as color, font, size, and more.
The lang Attribute
.
You should always include the lang attribute inside the <html> tag, to declare the language of the Web page. This is meant to assist search engines and browsers.
The title Attribute
.
The title attribute defines some extrainformation about an element.
The value of the title attribute will be displayed as a tooltip when you mouse over the element
Heading tags
Information on the Internet is displayed in different sizes to identify the hierarchyoftheirimportance. For instance, the title is usually written bigger than the usual text. To do this in your HTML document, you have to use the heading tags.
There are six levels of headings, which mean you can use varied heading sizes to create a hierarchy of information.
where n is a number from 1-6 and value may be left, right or center H1 is the largest in all the headings and H6 is the smallest. Browsers have different definitions on how they will display each heading level.
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 HTML <br> element defines a line break. Use <br> if you want a line break (a new line) without starting a new paragraph, it is also an empty tag
The HTML <pre> element defines preformattedtext. The text inside a <pre> element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks:
html blockquotes is used to change the left and right indentions of the text and is utilized for quoting a direct source within a document.
The HTML style attribute is used to add styles to an element, such as color, font, size, and more.
The CSS background-color property defines the background color for an HTML element.
The CSS color property defines the text color for an HTML element
The CSS font-family property defines the font to be used for an HTML element.
The CSS font-size property defines the text size for an HTML element
The CSS text-align property defines the horizontal text alignment for an HTML element.
The HTML <b> element defines bold text, without any extra importance.
The HTML <i> element defines a part of text in an alternate voice or mood. The content inside is typically displayed in italic.
Tip: The <i> tag is often used to indicate a technical term, a phrase from another language, a thought, a ship name, etc.
The HTML <em> element defines emphasized text. The content inside is typically displayed in italic.
Tip: A screen reader will pronounce the words in <em> with an emphasis, using verbal stress.
The HTML<small> element defines smaller text:
The HTML <mark> element defines text that should be marked or highlighted:
The HTML <del> element defines text that has been deleted from a document. Browsers will usually strikealine through deleted text