ItsBriBri Posted August 26, 2013 Share Posted August 26, 2013 If the <div> tag is used for grouping together elements, seeing as how it's a block element already, should it be used for grouping together other block-type tags? And if I want to display a block element as an inline element do I simply just add display:inline; or is there more to it? Also, as I understand the <base> tag will cause any bookmarks to open a new tab rather than jumping to that bookmark, but why? Also, doesn't href mean hyper-refference? And why isn't <link> used for links instead of the <a> tag? Link to comment Share on other sites More sharing options...
Ingolme Posted August 26, 2013 Share Posted August 26, 2013 <div> is just a container used for styling. It will behave just like a <span> or other inline element simply by using "display:inline" The <base> tag affects all relative URLs (URLs that aren't prepended by http:) in a page, whether it's links, images or embedded content. The base tag can be used to make all links open in a new tab but only if you set the target attribute. See more about <base> element attributes here: http://w3schools.com/tags/tag_base.asp I believe the href attribute stance for "hypertext reference" indicating where the hypertext refers to ("hypertext" means text that links to other locations), but there may be an explanation in the W3C HTML specification. I'm not sure why <a> and <link> were given their names. <a> means anchor, I guess it's a metaphor for leaving an "anchor" in another page. <link> is currently used to link files together in a semantic way. You use <link> to link a website to a CSS stylesheet or an RSS feed. You can even link it to other HTML pages. If you have pages that are meant to be in a sequence you can tell certain browsers which is the next page in the sequence, as in this example: <link rel="next" href="page3.html"><link rel="prev" href="page1.html"> 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now