Can i put HEAD and style tag in body element?

Discussion in 'HTML & Website Design' started by mahendra rajeshirke, Jul 26, 2010.

  1. #1
    hi,

    i m having one question that can i put head tag and style tag in body element?
     
    mahendra rajeshirke, Jul 26, 2010 IP
  2. deziner.web

    deziner.web Well-Known Member

    Messages:
    220
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #2
    well, I think you can.
     
    deziner.web, Jul 26, 2010 IP
  3. simpleloveman

    simpleloveman Guest

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    There is no need of putting a head tag inside the body!! You can put style tags inside instead of making Divs to apply a simple effect of or!

    Head should be Head! thats it!
     
    simpleloveman, Jul 26, 2010 IP
  4. clive2

    clive2 Peon

    Messages:
    343
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Header tag can't be placed inside body tag. Header tag means head of web page.
     
    clive2, Jul 26, 2010 IP
  5. mahendra rajeshirke

    mahendra rajeshirke Active Member

    Messages:
    402
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #5
    ty all for providing such information. :D
     
    mahendra rajeshirke, Jul 27, 2010 IP
  6. ahmed175

    ahmed175 Guest

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Yes Obviously you can add it
     
    ahmed175, Jul 27, 2010 IP
  7. joshvelco

    joshvelco Peon

    Messages:
    819
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #7
    No, head, is block level to body. So you can only place head outside of body.
     
    joshvelco, Jul 27, 2010 IP
  8. mcfox

    mcfox Wind Maker

    Messages:
    7,526
    Likes Received:
    716
    Best Answers:
    0
    Trophy Points:
    360
    #8
    NO. In order to function properly, the page must adhere to the rules and that means placing the head tags at the top of the page as they should be.
     
    mcfox, Jul 27, 2010 IP
  9. WarezCT.com

    WarezCT.com Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    You can put style tag in the body between these tags: <style></style>
    also you can add styles to your html items like this: <div style=" " >

    but you can not put head tag into a body tag
     
    WarezCT.com, Jul 27, 2010 IP
  10. Zeh.

    Zeh. Peon

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    The answer is "You can, but you mustn't".
     
    Zeh., Jul 27, 2010 IP
  11. ultimaterinks2006

    ultimaterinks2006 Member

    Messages:
    115
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #11
    You can put style tag any where in your body.There is no point of putting head in body section.For the shack of following best practices you should not put style or head in body part of code as it makes your code poor readability and hard to maintain.
     
    ultimaterinks2006, Jul 27, 2010 IP