Atributos HTML Todos os elementos HTML podem ter atributos Atributos fornecem informações adicionais sobre um elemento Atributos são sempre especificados na tag de início Atributos geralmente vêm em pares nome / valor como: name = “value”

 

O atributo href Links HTML são definidos com a tag <a>. O endereço do link é especificado no atributo href:

Exemplo

<a href="https://www.w3schools.com">This is a link</a>

O atributo src
Imagens HTML são definidas com a tag .

O nome do arquivo da origem da imagem é especificado no atributo src:

Exemplo

<img src="img_girl.jpg">

Atributos de largura e altura
Imagens em HTML têm um conjunto de atributos de tamanho, que especifica a largura e a altura da imagem:

Exemplo

<img src="img_girl.jpg" width="500" height="600">

O tamanho da imagem é especificado em pixels: width = “500” significa 500 pixels de largura.

Você aprenderá mais sobre imagens em nosso capítulo Imagens em HTML.

O atributo alt
O atributo alt especifica um texto alternativo a ser usado quando uma imagem não pode ser exibida.

O valor do atributo pode ser lido pelos leitores de tela. Dessa forma, alguém “escutando” a página da web, por exemplo uma pessoa com deficiência visual, pode “ouvir” o elemento.

Exemplo

<img src="img_girl.jpg" alt="Girl with a jacket">

Exemplo
Veja o que acontece se tentarmos exibir uma imagem que não existe:

<img src="img_typo.jpg" alt="Girl with a jacket">

O estilo Atributo
O atributo style é usado para especificar o estilo de um elemento, como cor, fonte, tamanho etc.

Exemplo

<p style="color:red">I am a paragraph</p>

Atributo lang
O idioma do documento pode ser declarado na tag.

O idioma é declarado com o atributo lang.

Declarar um idioma é importante para aplicativos de acessibilidade (leitores de tela) e mecanismos de pesquisa:

<!DOCTYPE html>
<html lang="en-US">
<body>

...

</body>
</html>

 

As primeiras duas letras especificam o idioma (en). Se houver um dialeto, use mais duas letras (US).

O título Atributo
Aqui, um atributo de título é adicionado ao elemento

. O valor do atributo title será exibido como uma dica ao passar o mouse sobre o parágrafo:

Exemplo

<p title="I'm a tooltip">
This is a paragraph.
</p>

 

Esse artigo ajudou você?

50 respostas para “Atributos HTML”

  1. Baked Sweets Feminized Cannabis Seed Mixpack

    I was able to find good info from your blog articles.

    Responder
  2. Facebook Video marketing guy

    I really enjoyed this article. I’ll return to see another! Thank you

    Responder
  3. view it bestnewsviral.com

    Heya i am for the first time here. I found this board and I find It really useful & it helped me out a lot. I hope to give something back and aid others like you aided me.

    Responder
  4. plus size lingerie

    My wife and i ended up being so cheerful when Albert could conclude his inquiry through your precious recommendations he obtained out of the web page. It’s not at all simplistic just to be releasing techniques men and women might have been selling. And we also realize we’ve got the blog owner to thank for this. The type of illustrations you’ve made, the simple website menu, the relationships your site aid to foster – it’s got many exceptional, and it is letting our son in addition to us feel that that topic is awesome, and that’s extremely pressing. Thank you for all the pieces!

    Responder
  5. Xmas Gifts

    Wow! This can be one particular of the most beneficial blogs We have ever arrive across on this subject. Actually Magnificent. I’m also an expert in this topic so I can understand your hard work.

    Responder
  6. 摩托車

    Have you ever considered writing an e-book or guest authoring on other blogs? I have a blog based upon on the same information you discuss and would really like to have you share some stories/information. I know my visitors would value your work. If you are even remotely interested, feel free to shoot me an email.

    Responder
  7. hicbdbye cbd online

    You could certainly see your skills in the paintings you write. The sector hopes for more passionate writers such as you who are not afraid to say how they believe. Always follow your heart. cbd oil cbd oil

    Responder
  8. free horror

    A fascinating discussion is definitely worth comment. I do believe that you should publish more about this subject, it might not be a taboo matter but generally folks don’t discuss such topics. To the next! Best wishes!

    Responder
  9. Oliva Rady

    Having read this I thought it was very informative. I appreciate you taking the time and effort to put Trik Sederhana Bermain SicBo this content together. I once again find myself personally spending a significant amount of time both reading and commenting

    Responder
  10. find out here legal news central

    Do you have a spam problem on this site; I also am a blogger, and I was wondering your situation; we have developed some nice methods and we are looking to trade solutions with other folks, be sure to shoot me an e-mail if interested.

    Responder
  11. Nona Mccarl

    Hey! I know this is somewhat off topic but I was wondering which blog platform are you using for this website? I’m getting sick and tired of WordPress because I’ve had problems with hackers and I’m looking at alternatives for another platform. I would be awesome if you could point me in the direction of a good platform.

    Responder
  12. Verbal Reasoning Tests

    There is definately a lot to know about this topic. I love all of the points you have made.

    Responder
  13. eyeliner

    You made some decent points there. I checked on the net to learn more about the issue and found most individuals will go along with your views on this site.

    Responder
  14. Pumpkin Dave

    Enjoyed your blog post. It’s the time of year. During autumn it’s an excellent time to enjoy dunkin donuts pumpkin spice latte.

    Responder
  15. Janis Ellert

    Regularly I tend not to make comments on websites, however I will need to point out that this blog post genuinely compelled me to take some action. Quite notable content.

    Responder
  16. Delta 8 THC gummies

    Way cool! Some very valid points! I appreciate you penning this article plus the rest of the site is very good.

    Responder
  17. Adina Belter

    Good site! I really love how it is nice on my eyes it is. I am wondering how I might be notified whenever a new post has been made. I’ve subscribed to your RSS feed which may do the trick? Have a nice day!

    Responder
  18. September Sliter

    You should indulge in a tournament for just one of the most useful blogs on the net. I will suggest this page!

    Responder
  19. Room of choice delivery

    I truly appreciate this post. I have been looking everywhere for this! Thank goodness I found it on Bing. You’ve made my day! Thank you again!

    Responder
  20. Hot Snapchats

    This information is so amazing thanks! I love sucking dick btw hmu

    Responder
  21. Colin Sala

    Thanks for your article on this weblog. From my own personal experience, occasionally softening way up a photograph may provide the digital photographer with an amount of an artsy flare. Sometimes however, the soft clouds isn’t exactly what you had in mind and can in many cases spoil a normally good photograph, especially if you consider enlarging the item.

    Responder
  22. 출장안마

    I quite like reading through an article that can make people think. Also, thank you for permitting me to comment!

    Responder
  23. plumbing and heating site

    This is the right blog for anybody who wants to search out out about this topic. You notice so much its nearly hard to argue with you (not that I really would want…HaHa). You undoubtedly put a brand new spin on a topic thats been written about for years. Nice stuff, just great!

    Responder
  24. Generies Pédales VTT à vendre

    Definitely, what a magnificent blog and enlightening posts, I definitely will bookmark your website.All the Best!

    Responder
  25. COKECO Vélos de montagne à vendre

    Merely wanna input that you have a very nice website , I the layout it actually stands out.

    Responder
  26. foundation repair companies chicago

    Wow that was unusual. I just wrote an incredibly long comment but after I clicked submit my comment didn’t appear. Grrrr… well I’m not writing all that over again. Anyhow, just wanted to say fantastic blog!

    Responder
  27. Full Report

    I just want to say I’m newbie to blogging and site-building and absolutely loved you’re web-site. Very likely I’m likely to bookmark your blog . You surely come with really good well written articles. With thanks for sharing with us your website.

    Responder
  28. VitalFlow Ingredients

    Oh my goodness! Awesome article dude! Many thanks, However I am experiencing troubles with your RSS. I don’t know the reason why I cannot join it. Is there anybody else getting the same RSS issues? Anybody who knows the answer can you kindly respond? Thanks!!

    Responder
  29. 마사지알바

    I love your blog page. I’m used. Thank an individual.

    Responder
  30. 안전토토

    Best view i have ever seen !

    Responder
  31. San Diego Plumber advice

    Hello There. I found your blog using msn. This is an extremely well written article. I’ll be sure to bookmark it and come back to read more of your useful information. Thanks for the post. I’ll certainly return.

    Responder
  32. YesBet88

    Best view i have ever seen !

    Responder
  33. small house remodel ideas

    Do you mind if I quote a couple of your articles as long as I provide credit and sources back to your webpage? My blog is in the exact same niche as yours and my visitors would definitely benefit from some of the information you present here. Please let me know if this okay with you. Many thanks!

    Responder
  34. porno

    You made some decent points there. I looked on the internet for the subject matter and found most persons will approve with your site.

    Responder
  35. Pool table movers

    Hi there! Would you mind if I share your blog with my zynga group? There’s a lot of people that I think would really enjoy your content. Please let me know. Thank you

    Responder
  36. White glove delivery

    Pretty nice post. I just stumbled upon your weblog and wanted to say that I have truly enjoyed surfing around your blog posts. In any case I’ll be subscribing to your feed and I hope you write again soon!

    Responder
  37. digital marketing books

    Good – I should certainly pronounce, impressed with your site. I had no trouble navigating through all the tabs as well as related info ended up being truly simple to do to access. I recently found what I hoped for before you know it in the least. Quite unusual. Is likely to appreciate it for those who add forums or something, site theme . a tones way for your client to communicate. Nice task..

    Responder
  38. roadside assistance

    You have remarked very interesting details ! ps nice website . “There is no vice so simple but assumes some mark of virtue on his outward parts.” by Mary Bertone.

    Responder
  39. alberta car towing

    Some really excellent posts on this website, thanks for contribution. “The spirit is the true self.” by Marcus Tullius Cicero.

    Responder
  40. my sources

    Hello my friend! I wish to say that this post is awesome, nice written and include almost all significant infos. I’d like to peer more posts like this.

    Responder
  41. special info

    I just want to tell you that I’m new to blogging and site-building and actually loved you’re blog. More than likely I’m likely to bookmark your blog . You certainly have excellent stories. Appreciate it for revealing your web-site.

    Responder
  42. sportsurge

    You really make it seem so easy with your presentation but I find this matter to be really something that I think I would never understand. It seems too complicated and very broad for me. I am looking forward for your next post, I’ll try to get the hang of it!

    Responder
  43. Commercial cleaning company

    Today, I went to the beach front with my children. I found a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is entirely off topic but I had to tell someone!

    Responder
  44. you can try these out

    Good blog! I really love how it is easy on my eyes and the data are well written. I’m wondering how I could be notified whenever a new post has been made. I’ve subscribed to your RSS feed which must do the trick! Have a great day!

    Responder
  45. visit this site

    Great write-up, I am normal visitor of one¡¦s site, maintain up the excellent operate, and It is going to be a regular visitor for a long time.

    Responder
  46. live casino vegas

    It could appear that Jessie Vargas has been around in forever, having said that he basically 23 years.
    The ideal strategy is always to listen. Louisville plans on using balanced attack.

    Responder
  47. Shandra Riston

    I simply want to mention I am newbie to blogging and site-building and truly enjoyed you’re website. Very likely I’m going to bookmark your website . You really have superb articles and reviews. Regards for sharing with us your webpage.

    Responder

Comente sobre este conteúdo! Escreva o que pensa, complemente, vamos discutir. O conhecimento é livre!