Posts

Showing posts from March, 2017

HTML paragraph(HTML5it)

HTML  Paragraphs HTML Paragraphs The HTML  <p>  element defines a  paragraph : Example < p > This is a paragraph. < /p > < p > This is another paragraph. < /p > Note:  Browsers automatically add some white space (a margin) before and after a paragraph. HTML Display You cannot be sure how HTML will be displayed. Large or small screens, and resized windows will create different results. With HTML, you cannot change the output by adding extra spaces or extra lines in your HTML code. The browser will remove any extra spaces and extra lines when the page is displayed: Example < 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 > Don't Forget the End Tag Most browsers will display HTML correctly even if you forget

Html headings part-1(HTML5it)

Headings are important in HTML documents. HTML Headings Headings are defined with the <h1> to <h6> tags. <h1> defines the most important heading. <h6> defines the least important heading. Example < h1 > This is heading 1 < /h1 > < h2 > This is heading 2 < /h2 > < h3 > This is heading 3 < /h3 > < h4 > This is heading 4 < /h4 > < h5 > This is heading 5 < /h5 > < h6 > This is heading 6 < /h6 > Note:  Browsers automatically add some white space (a margin) before and after a heading. Headings Are Important Search engines use the headings to index the structure and content of your web pages. Users skim your pages by its headings. It is important to use headings to show the document structure. <h1> headings should be used for main headings, followed by <h2> headings, then the less important <h3>, and so on. Note:  Use HTML headings for headings

HTML Attributes(HTML5it)

HTML Attributes All HTML elements can have  attributes Attributes provide  additional information  about an element Attributes are always specified in  the start tag Attributes usually come in name/value pairs like:  name="value" The lang Attribute The language of the document can be declared in the  <html>  tag. The language is declared with the  lang  attribute. Declaring a language is important for accessibility applications (screen readers) and search engines: < !DOCTYPE  html > < html  lang ="en-US" > < body > ... < /body > < /html > The first two letters specify the language (en). If there is a dialect, use two more letters (US). The title Attribute Here, a  title  attribute is added to the  <p>  element. The value of the title attribute will be displayed as a tooltip when you mouse over the paragraph: Example < p  title ="I'm a tooltip" > This is a paragraph

HTML Elements(HTML5it)

HTML Elements An HTML element usually consists of a  start  tag and  end  tag, with the content inserted in between: < tagname > Content goes here... < /tagname > The HTML  element  is everything from the start tag to the end tag: < p > My first paragraph. < /p > Start tag Element content End tag <h1> My First Heading </h1> <p> My first paragraph. </p> <br> HTML elements with no content are called empty elements. Empty elements do not have an end tag, such as the <br> element (which indicates a line break). Nested HTML Elements HTML elements can be nested (elements can contain elements). All HTML documents consist of nested HTML elements. This example contains four HTML elements: Example < !DOCTYPE  html > < html > < body > < h1 > My First Heading < /h1 > < p > My first paragraph. < /p > < /body > < /html > Example Explained Th

HTML documents(HTML5it)

HTML Documents All HTML documents must start with a document type declaration:  <!DOCTYPE html> . The HTML document itself begins with  <html>  and ends with  </html> . The visible part of the HTML document is between  <body>  and  </body> . Example < !DOCTYPE  html > < html > < body > < h1 > My First Heading < /h1 > < p > My first paragraph. < /p > < /body > < /html > HTML Headings HTML headings are defined with the  <h1>  to  <h6>  tags. <h1> defines the most important heading. <h6> defines the least important heading:  Example < h1 > This is heading 1 < /h1 > < h2 > This is heading 2 < /h2 > < h3 > This is heading 3 < /h3 > HTML Paragraphs HTML paragraphs are defined with the  <p>  tag: Example < p > This is a paragraph. < /p > < p > This is another paragraph. < /p &g

HTML basic(HTML5it)

Image
Write HTML Using Notepad or TextEdit Web pages can be created and modified by using professional HTML editors. However, for learning HTML we recommend a simple text editor like Notepad (PC) or TextEdit (Mac). We believe using a simple text editor is a good way to learn HTML. Follow the four steps below to create your first web page with Notepad or TextEdit. Step 1: Open Notepad (PC) Windows 8 or later: Open the  Start Screen  (the window symbol at the bottom left on your screen). Type  Notepad . Windows 7 or earlier: Open  Start  >  Programs >   Accessories >   Notepad Step 1: Open TextEdit (Mac) Open  Finder > Applications > TextEdit Also change some preferences to get the application to save files correctly.  In  Preferences > Format >  choose  "Plain Text" Then under "Open and Save", check the box that says "Ignore rich text commands in HTML files". Then open a new document to place the code. Ste