Programming Blog

This blog is about technical and programming questions and there solutions. I also cover programs that were asked in various interviews, it will help you to crack the coding round of various interviews

Saturday 6 January 2018

html tags examples

Below is a listing of just a smattering of important tags, some of which are described for the first time below.
<a href="URL">
Specifies an anchor, where the user can click on the content inside the element to go to another page. The destination page is specified in the tag's href attribute.
<b>
Specifies that the enclosed text should appear in boldface.
<body>
Encloses the contents of the Web page. This should always be nested directly inside the <html> element, following the <head> element.
<br />
Inserts a line break. This element never has any meaningful content. Note that you should use <p> to handle paragraph breaks.
<em>
Specifies that the enclosed text should be emphasized, typically by appearing in italics.
<h1>
Specifies a level-1 heading, which will typically be displayed using large boldface characters. Note that this should not appear inside a <p> element.
<h2>
Specifies a level-2 heading, which will typically be displayed using large boldface characters, but not quite so large as produced by <h1>. This also should not appear inside a <p> element. You can think of the intended relationship between <h1> and <h2>elements as the  relationship between chapter headings and section headings.
<head>
Encloses other elements giving information about the Web page (not including its content). This should always be nested directly inside the <html> element.
<html xmlns="URL">
Encloses the entire contents of the HTML document. The xmlns attribute is to refer to a special XML specification file; an appropriate value for this attribute, which you can safely copy into every file you create, ishttp://www.w3.org/1999/xhtml.
<img src="URL" />
Indicates that the browser should display an image if possible. The browser would retrieve the image from the location specified in the tag's src attribute. The <img> element will never have any contents, so you'd usually combine the opening and closing tags.
<p>
Encloses each paragraph of a document.
<title>
Specifies the Web page's title. This typically appear in the Web browser's title bar or tab, and it also typically appears when the user views the Backmenu of recently visited  pages. The <title> element should only appear in a page's <head> section.
The above selection is just a small smattering of the many tags available in HTML. It's enough for the purpose of learning PHP, but it's certainly not enough to compose attractive pages. To learn more about HTML, I recommend acquiring and reading Elizabeth Castro's book, HTML, XHTML & CSS, from Peachpit Press.

No comments:

Post a Comment